Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Public API should be namespaced (as static functions of a class) #217

Open
4 tasks done
lukehutch opened this issue Mar 11, 2024 · 1 comment
Open
4 tasks done
Assignees
Labels
type: enhancement New feature or request

Comments

@lukehutch
Copy link

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS

Steps to reproduce

Currently the API methods of flutter-geocoding are exposed as toplevel public functions.

The functions placemarkFromCoordinates and locationFromAddress are specific enough that it is likely to be obvious that they are geocoder methods. However, that is not true for setLocaleIdentifier or isPresent.

Expected results

These should all be static methods of a class, PlatformGeocoder or something, so that it is obvious which package the methods are calling into (and so that there's no possibility of name clashes with other public methods).

Actual results

As above

Code sample

N/A

Screenshots or video

Screenshots or video demonstration

[Upload media here]

Version

2.2.1

Flutter Doctor output

Doctor output
$ flutter doctor -v
[✓] Flutter (Channel beta, 3.20.0-1.2.pre, on Fedora Linux 39 (Workstation Edition) 6.7.7-200.fc39.x86_64, locale en_US.utf8)
    • Flutter version 3.20.0-1.2.pre on channel beta at /opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 1751123cde (3 weeks ago), 2024-02-21 22:06:22 -0800
    • Engine revision 299e852cb9
    • Dart version 3.4.0 (build 3.4.0-99.1.beta)
    • DevTools version 2.31.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /home/luke/Android/Sdk
    • Platform android-34, build-tools 33.0.1
    • Java binary at: /opt/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 17.0.6 (Fedora 17.0.6-2.fc39)
    • cmake version 3.27.7
    • ninja version 1.11.1
    • pkg-config version 1.9.5

[✓] Android Studio (version 2022.2)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 73.0.2
    • Dart plugin version 222.4582
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.87.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.85.20240301

[✓] VS Code (version 1.88.0-insider)
    • VS Code at /usr/share/code-insiders
    • Flutter extension version 3.79.20231130

[✓] Connected device (3 available)
    • sdk gphone x86 64 (mobile) • emulator-5554 • android-x64    • Android 13 (API 33) (emulator)
    • Linux (desktop)            • linux         • linux-x64      • Fedora Linux 39 (Workstation Edition) 6.7.7-200.fc39.x86_64
    • Chrome (web)               • chrome        • web-javascript • Google Chrome 122.0.6261.94

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@TimHoogstrate
Copy link
Contributor

Dear @lukehutch,

Seems like an interesting suggestion. I'll label this as an enhancement.

Kind regards,

@TimHoogstrate TimHoogstrate self-assigned this Mar 12, 2024
@TimHoogstrate TimHoogstrate added the type: enhancement New feature or request label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants