├── geolocator_apple ├── ios │ ├── Assets │ │ └── .gitkeep │ ├── Classes │ │ ├── geolocator-umbrella.h │ │ ├── GeolocatorPlugin.h │ │ ├── Utils │ │ │ ├── ServiceStatus.h │ │ │ ├── ActivityTypeMapper.h │ │ │ ├── LocationMapper.h │ │ │ ├── PermissionUtils.h │ │ │ ├── LocationAccuracyMapper.h │ │ │ ├── LocationDistanceMapper.h │ │ │ ├── AuthorizationStatusMapper.h │ │ │ ├── LocationDistanceMapper.m │ │ │ ├── PermissionUtils.m │ │ │ ├── AuthorizationStatusMapper.m │ │ │ ├── ActivityTypeMapper.m │ │ │ └── LocationAccuracyMapper.m │ │ ├── Handlers │ │ │ ├── GeolocationHandler_Test.h │ │ │ ├── LocationServiceStreamHandler.h │ │ │ ├── PositionStreamHandler.h │ │ │ ├── PermissionHandler.h │ │ │ ├── LocationAccuracyHandler.h │ │ │ └── LocationServiceStreamHandler.m │ │ ├── Constants │ │ │ ├── ErrorCodes.h │ │ │ └── ErrorCodes.m │ │ ├── GeolocatorPlugin.modulemap │ │ └── GeolocatorPlugin_Test.h │ ├── .gitignore │ └── geolocator_apple.podspec ├── example │ ├── ios │ │ ├── Flutter │ │ │ ├── .last_build_id │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── AppFrameworkInfo.plist │ │ ├── Runner │ │ │ ├── AppDelegate.h │ │ │ ├── Assets.xcassets │ │ │ │ ├── LaunchImage.imageset │ │ │ │ │ ├── LaunchImage.png │ │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ │ ├── README.md │ │ │ │ │ └── Contents.json │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ ├── main.m │ │ │ └── AppDelegate.m │ │ ├── Runner.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── .gitignore │ ├── macos │ │ ├── .gitignore │ │ ├── Runner │ │ │ ├── Configs │ │ │ │ ├── Debug.xcconfig │ │ │ │ ├── Release.xcconfig │ │ │ │ ├── Warnings.xcconfig │ │ │ │ └── AppInfo.xcconfig │ │ │ ├── Assets.xcassets │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── app_icon_16.png │ │ │ │ │ ├── app_icon_32.png │ │ │ │ │ ├── app_icon_64.png │ │ │ │ │ ├── app_icon_1024.png │ │ │ │ │ ├── app_icon_128.png │ │ │ │ │ ├── app_icon_256.png │ │ │ │ │ └── app_icon_512.png │ │ │ ├── AppDelegate.swift │ │ │ ├── Release.entitlements │ │ │ ├── MainFlutterWindow.swift │ │ │ ├── DebugProfile.entitlements │ │ │ └── Info.plist │ │ ├── Flutter │ │ │ ├── Flutter-Debug.xcconfig │ │ │ ├── Flutter-Release.xcconfig │ │ │ └── GeneratedPluginRegistrant.swift │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── Runner.xcodeproj │ │ │ └── project.xcworkspace │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── res │ │ └── images │ │ │ ├── baseflow_logo_def_light-02.png │ │ │ ├── poweredByBaseflowLogoLight.png │ │ │ ├── poweredByBaseflowLogoLight@2x.png │ │ │ ├── poweredByBaseflowLogoLight@3x.png │ │ │ └── poweredByBaseflowLogoLight_2020-06-23.zip │ ├── .metadata │ ├── README.md │ └── .gitignore ├── macos │ ├── Classes │ │ ├── GeolocatorPlugin.h │ │ ├── GeolocatorPlugin.m │ │ ├── geolocator-umbrella.h │ │ ├── Constants │ │ │ ├── ErrorCodes.h │ │ │ └── ErrorCodes.m │ │ ├── GeolocatorPlugin_Test.h │ │ ├── Utils │ │ │ ├── LocationMapper.h │ │ │ ├── LocationMapper.m │ │ │ ├── PermissionUtils.h │ │ │ ├── PermissionUtils.m │ │ │ ├── ServiceStatus.h │ │ │ ├── ActivityTypeMapper.h │ │ │ ├── ActivityTypeMapper.m │ │ │ ├── LocationAccuracyMapper.h │ │ │ ├── LocationAccuracyMapper.m │ │ │ ├── LocationDistanceMapper.h │ │ │ ├── LocationDistanceMapper.m │ │ │ ├── AuthorizationStatusMapper.h │ │ │ └── AuthorizationStatusMapper.m │ │ ├── GeolocatorPlugin.modulemap │ │ └── Handlers │ │ │ ├── PermissionHandler.h │ │ │ ├── PermissionHandler.m │ │ │ ├── GeolocationHandler.h │ │ │ ├── GeolocationHandler.m │ │ │ ├── PositionStreamHandler.h │ │ │ ├── PositionStreamHandler.m │ │ │ ├── GeolocationHandler_Test.h │ │ │ ├── LocationAccuracyHandler.h │ │ │ ├── LocationAccuracyHandler.m │ │ │ ├── LocationServiceStreamHandler.h │ │ │ └── LocationServiceStreamHandler.m │ └── geolocator_apple.podspec ├── .gitignore ├── analysis_options.yaml ├── AUTHORS ├── .metadata ├── lib │ ├── geolocator_apple.dart │ └── src │ │ └── types │ │ └── activity_type.dart ├── pubspec.yaml ├── LICENSE └── test │ └── method_channel_mock.dart ├── geolocator_linux ├── example │ ├── linux │ │ ├── .gitignore │ │ ├── main.cc │ │ ├── flutter │ │ │ ├── generated_plugin_registrant.h │ │ │ ├── generated_plugin_registrant.cc │ │ │ └── generated_plugins.cmake │ │ └── my_application.h │ ├── README.md │ ├── res │ │ └── images │ │ │ ├── baseflow_logo_def_light-02.png │ │ │ ├── poweredByBaseflowLogoLight.png │ │ │ ├── poweredByBaseflowLogoLight@2x.png │ │ │ ├── poweredByBaseflowLogoLight@3x.png │ │ │ └── poweredByBaseflowLogoLight_2020-06-23.zip │ ├── .metadata │ └── .gitignore ├── analysis_options.yaml ├── lib │ ├── geolocator_linux.dart │ └── src │ │ └── geolocator_gnome.dart ├── CHANGELOG.md ├── AUTHORS ├── .metadata ├── .gitignore ├── pubspec.yaml └── LICENSE ├── geolocator ├── example │ ├── ios │ │ ├── Flutter │ │ │ ├── .last_build_id │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── AppFrameworkInfo.plist │ │ ├── Runner │ │ │ ├── AppDelegate.h │ │ │ ├── Assets.xcassets │ │ │ │ ├── LaunchImage.imageset │ │ │ │ │ ├── LaunchImage.png │ │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ │ ├── README.md │ │ │ │ │ └── Contents.json │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ ├── main.m │ │ │ └── AppDelegate.m │ │ ├── Runner.xcodeproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── .gitignore │ ├── web │ │ ├── favicon.png │ │ ├── icons │ │ │ ├── Icon-192.png │ │ │ └── Icon-512.png │ │ └── manifest.json │ ├── macos │ │ ├── .gitignore │ │ ├── Runner │ │ │ ├── Configs │ │ │ │ ├── Debug.xcconfig │ │ │ │ ├── Release.xcconfig │ │ │ │ ├── Warnings.xcconfig │ │ │ │ └── AppInfo.xcconfig │ │ │ ├── Assets.xcassets │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── app_icon_128.png │ │ │ │ │ ├── app_icon_16.png │ │ │ │ │ ├── app_icon_256.png │ │ │ │ │ ├── app_icon_32.png │ │ │ │ │ ├── app_icon_512.png │ │ │ │ │ ├── app_icon_64.png │ │ │ │ │ └── app_icon_1024.png │ │ │ ├── AppDelegate.swift │ │ │ ├── Release.entitlements │ │ │ ├── MainFlutterWindow.swift │ │ │ ├── DebugProfile.entitlements │ │ │ └── Info.plist │ │ ├── Flutter │ │ │ ├── Flutter-Debug.xcconfig │ │ │ ├── Flutter-Release.xcconfig │ │ │ └── GeneratedPluginRegistrant.swift │ │ ├── Runner.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── Runner.xcodeproj │ │ │ └── project.xcworkspace │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── android │ │ ├── gradle.properties │ │ ├── .gitignore │ │ ├── app │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── values │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values-night │ │ │ │ │ │ └── styles.xml │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── baseflow │ │ │ │ │ └── geolocator_example │ │ │ │ │ └── MainActivity.java │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── settings.gradle │ │ └── build.gradle │ ├── windows │ │ ├── runner │ │ │ ├── resources │ │ │ │ └── app_icon.ico │ │ │ ├── resource.h │ │ │ ├── CMakeLists.txt │ │ │ ├── utils.h │ │ │ ├── runner.exe.manifest │ │ │ ├── flutter_window.h │ │ │ └── main.cpp │ │ ├── .gitignore │ │ └── flutter │ │ │ ├── generated_plugin_registrant.h │ │ │ ├── generated_plugin_registrant.cc │ │ │ └── generated_plugins.cmake │ ├── res │ │ └── images │ │ │ ├── baseflow_logo_def_light-02.png │ │ │ ├── poweredByBaseflowLogoLight.png │ │ │ ├── poweredByBaseflowLogoLight@2x.png │ │ │ ├── poweredByBaseflowLogoLight@3x.png │ │ │ └── poweredByBaseflowLogoLight_2020-06-23.zip │ ├── .metadata │ ├── README.md │ └── .gitignore ├── .gitignore ├── analysis_options.yaml ├── .metadata ├── LICENSE └── pubspec.yaml ├── geolocator_android ├── android │ ├── settings.gradle │ ├── src │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── baseflow │ │ │ │ └── geolocator │ │ │ │ ├── location │ │ │ │ ├── ServiceStatus.java │ │ │ │ ├── NotificationImportance.java │ │ │ │ ├── LocationAccuracy.java │ │ │ │ ├── PositionChangedCallback.java │ │ │ │ ├── LocationAccuracyStatus.java │ │ │ │ ├── LocationServiceListener.java │ │ │ │ ├── FlutterLocationServiceListener.java │ │ │ │ ├── AndroidIconResource.java │ │ │ │ ├── LocationAccuracyManager.java │ │ │ │ └── LocationClient.java │ │ │ │ ├── errors │ │ │ │ ├── PermissionUndefinedException.java │ │ │ │ └── ErrorCallback.java │ │ │ │ └── permission │ │ │ │ ├── PermissionResultCallback.java │ │ │ │ ├── LocationPermission.java │ │ │ │ └── PermissionUtils.java │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── example │ ├── android │ │ ├── gradle.properties │ │ ├── .gitignore │ │ ├── app │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── values │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values-night │ │ │ │ │ │ └── styles.xml │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── baseflow │ │ │ │ │ └── geolocator_example │ │ │ │ │ └── MainActivity.java │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── settings.gradle │ │ └── build.gradle │ ├── res │ │ └── images │ │ │ ├── baseflow_logo_def_light-02.png │ │ │ ├── poweredByBaseflowLogoLight.png │ │ │ ├── poweredByBaseflowLogoLight@2x.png │ │ │ ├── poweredByBaseflowLogoLight@3x.png │ │ │ └── poweredByBaseflowLogoLight_2020-06-23.zip │ ├── .metadata │ └── README.md ├── analysis_options.yaml ├── AUTHORS ├── lib │ └── geolocator_android.dart ├── pubspec.yaml ├── LICENSE └── test │ └── method_channel_mock.dart ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── e-question.md │ ├── b-bug-report.md │ ├── a-regression.md │ ├── d-enhancement-proposal.md │ └── c-feature-request.md └── PULL_REQUEST_TEMPLATE.md ├── geolocator_platform_interface ├── lib │ ├── src │ │ ├── extensions │ │ │ ├── extensions.dart │ │ │ └── integer_extensions.dart │ │ ├── models │ │ │ └── models.dart │ │ ├── enums │ │ │ ├── enums.dart │ │ │ ├── location_service.dart │ │ │ ├── location_accuracy_status.dart │ │ │ ├── location_accuracy.dart │ │ │ └── location_permission.dart │ │ └── errors │ │ │ ├── errors.dart │ │ │ ├── location_service_disabled_exception.dart │ │ │ ├── already_subscribed_exception.dart │ │ │ ├── position_update_exception.dart │ │ │ ├── permission_denied_exception.dart │ │ │ ├── invalid_permission_exception.dart │ │ │ ├── permission_request_in_progress_exception.dart │ │ │ ├── permission_definitions_not_found_exception.dart │ │ │ └── activity_missing_exception.dart │ └── geolocator_platform_interface.dart ├── analysis_options.yaml ├── test │ └── src │ │ ├── errors │ │ ├── location_service_disabled_exception_test.dart │ │ ├── already_subscribed_exception_test.dart │ │ ├── invalid_permission_exception_test.dart │ │ ├── position_update_exception_test.dart │ │ └── permission_denied_exception_test.dart │ │ ├── enums │ │ ├── location_permission_test.dart │ │ └── location_accuracy_test.dart │ │ └── implementations │ │ └── method_channel_mock.dart ├── pubspec.yaml └── LICENSE ├── geolocator_web ├── example │ ├── web │ │ ├── favicon.png │ │ ├── icons │ │ │ ├── Icon-192.png │ │ │ └── Icon-512.png │ │ └── manifest.json │ ├── res │ │ └── images │ │ │ ├── baseflow_logo_def_light-02.png │ │ │ ├── poweredByBaseflowLogoLight.png │ │ │ ├── poweredByBaseflowLogoLight@2x.png │ │ │ ├── poweredByBaseflowLogoLight@3x.png │ │ │ └── poweredByBaseflowLogoLight_2020-06-23.zip │ ├── .metadata │ ├── README.md │ └── .gitignore ├── analysis_options.yaml ├── pubspec.yaml ├── LICENSE └── lib │ └── src │ ├── permissions_manager.dart │ ├── html_permissions_manager.dart │ └── geolocation_manager.dart ├── geolocator_windows ├── CHANGELOG.md ├── example │ ├── windows │ │ ├── runner │ │ │ ├── resources │ │ │ │ └── app_icon.ico │ │ │ ├── resource.h │ │ │ ├── CMakeLists.txt │ │ │ ├── utils.h │ │ │ ├── runner.exe.manifest │ │ │ └── flutter_window.h │ │ ├── .gitignore │ │ └── flutter │ │ │ ├── generated_plugin_registrant.h │ │ │ ├── generated_plugin_registrant.cc │ │ │ └── generated_plugins.cmake │ ├── res │ │ └── images │ │ │ ├── baseflow_logo_def_light-02.png │ │ │ ├── poweredByBaseflowLogoLight.png │ │ │ ├── poweredByBaseflowLogoLight@2x.png │ │ │ ├── poweredByBaseflowLogoLight@3x.png │ │ │ └── poweredByBaseflowLogoLight_2020-06-23.zip │ ├── .metadata │ ├── README.md │ └── .gitignore ├── AUTHORS ├── windows │ ├── geolocator_windows.cpp │ ├── geolocator_enums.h │ └── include │ │ └── geolocator_windows │ │ └── geolocator_windows.h ├── pubspec.yaml └── LICENSE ├── .metadata ├── .gitattributes └── LICENSE /geolocator_apple/ios/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /geolocator_linux/example/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /geolocator/example/ios/Flutter/.last_build_id: -------------------------------------------------------------------------------- 1 | da0244c85ad60d0a306fb416a443d50a -------------------------------------------------------------------------------- /geolocator_android/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'geolocator' 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: Baseflow 2 | custom: https://baseflow.com/contact 3 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Flutter/.last_build_id: -------------------------------------------------------------------------------- 1 | da0244c85ad60d0a306fb416a443d50a -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/GeolocatorPlugin.h: -------------------------------------------------------------------------------- 1 | ../../ios/Classes/GeolocatorPlugin.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/GeolocatorPlugin.m: -------------------------------------------------------------------------------- 1 | ../../ios/Classes/GeolocatorPlugin.m -------------------------------------------------------------------------------- /geolocator_linux/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/geolocator-umbrella.h: -------------------------------------------------------------------------------- 1 | ../../ios/Classes/geolocator-umbrella.h -------------------------------------------------------------------------------- /geolocator/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Constants/ErrorCodes.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Constants/ErrorCodes.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Constants/ErrorCodes.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Constants/ErrorCodes.m -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/GeolocatorPlugin_Test.h: -------------------------------------------------------------------------------- 1 | ../../ios/Classes/GeolocatorPlugin_Test.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/LocationMapper.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/LocationMapper.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/LocationMapper.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/LocationMapper.m -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/PermissionUtils.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/PermissionUtils.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/PermissionUtils.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/PermissionUtils.m -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/ServiceStatus.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/ServiceStatus.h -------------------------------------------------------------------------------- /geolocator_apple/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/GeolocatorPlugin.modulemap: -------------------------------------------------------------------------------- 1 | ../../ios/Classes/GeolocatorPlugin.modulemap -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/extensions/extensions.dart: -------------------------------------------------------------------------------- 1 | export 'integer_extensions.dart'; 2 | -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/PermissionHandler.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/PermissionHandler.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/PermissionHandler.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/PermissionHandler.m -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/ActivityTypeMapper.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/ActivityTypeMapper.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/ActivityTypeMapper.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/ActivityTypeMapper.m -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/GeolocationHandler.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/GeolocationHandler.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/GeolocationHandler.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/GeolocationHandler.m -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/LocationAccuracyMapper.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/LocationAccuracyMapper.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/LocationAccuracyMapper.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/LocationAccuracyMapper.m -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/LocationDistanceMapper.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/LocationDistanceMapper.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/LocationDistanceMapper.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/LocationDistanceMapper.m -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/PositionStreamHandler.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/PositionStreamHandler.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/PositionStreamHandler.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/PositionStreamHandler.m -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/AuthorizationStatusMapper.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/AuthorizationStatusMapper.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Utils/AuthorizationStatusMapper.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Utils/AuthorizationStatusMapper.m -------------------------------------------------------------------------------- /geolocator_linux/lib/geolocator_linux.dart: -------------------------------------------------------------------------------- 1 | library geolocator_linux; 2 | 3 | export 'src/geolocator_linux.dart'; 4 | -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/GeolocationHandler_Test.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/GeolocationHandler_Test.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/LocationAccuracyHandler.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/LocationAccuracyHandler.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/LocationAccuracyHandler.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/LocationAccuracyHandler.m -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'position.dart'; 2 | export 'location_settings.dart'; 3 | -------------------------------------------------------------------------------- /geolocator_linux/example/README.md: -------------------------------------------------------------------------------- 1 | # geolocator_linux_example 2 | 3 | Demonstrates how to use the geolocator_linux plugin. 4 | -------------------------------------------------------------------------------- /geolocator/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/web/favicon.png -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/LocationServiceStreamHandler.h: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/LocationServiceStreamHandler.h -------------------------------------------------------------------------------- /geolocator_apple/macos/Classes/Handlers/LocationServiceStreamHandler.m: -------------------------------------------------------------------------------- 1 | ../../../ios/Classes/Handlers/LocationServiceStreamHandler.m -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/geolocator-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | -------------------------------------------------------------------------------- /geolocator_web/example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_web/example/web/favicon.png -------------------------------------------------------------------------------- /geolocator/example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /geolocator/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /geolocator/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /geolocator_android/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /geolocator_web/example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_web/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /geolocator_web/example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_web/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /geolocator/example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /geolocator/example/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /geolocator/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /geolocator/example/res/images/baseflow_logo_def_light-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/res/images/baseflow_logo_def_light-02.png -------------------------------------------------------------------------------- /geolocator/example/res/images/poweredByBaseflowLogoLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/res/images/poweredByBaseflowLogoLight.png -------------------------------------------------------------------------------- /geolocator_android/example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /geolocator/example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /geolocator/example/res/images/poweredByBaseflowLogoLight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/res/images/poweredByBaseflowLogoLight@2x.png -------------------------------------------------------------------------------- /geolocator/example/res/images/poweredByBaseflowLogoLight@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/res/images/poweredByBaseflowLogoLight@3x.png -------------------------------------------------------------------------------- /geolocator/example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /geolocator_apple/example/res/images/baseflow_logo_def_light-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/res/images/baseflow_logo_def_light-02.png -------------------------------------------------------------------------------- /geolocator_apple/example/res/images/poweredByBaseflowLogoLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/res/images/poweredByBaseflowLogoLight.png -------------------------------------------------------------------------------- /geolocator_linux/example/res/images/baseflow_logo_def_light-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_linux/example/res/images/baseflow_logo_def_light-02.png -------------------------------------------------------------------------------- /geolocator_linux/example/res/images/poweredByBaseflowLogoLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_linux/example/res/images/poweredByBaseflowLogoLight.png -------------------------------------------------------------------------------- /geolocator_web/example/res/images/baseflow_logo_def_light-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_web/example/res/images/baseflow_logo_def_light-02.png -------------------------------------------------------------------------------- /geolocator_web/example/res/images/poweredByBaseflowLogoLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_web/example/res/images/poweredByBaseflowLogoLight.png -------------------------------------------------------------------------------- /geolocator_windows/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.1.1 2 | 3 | - Fixes repository URL of the package. 4 | 5 | ## 0.1.0 6 | 7 | - Adds an initial implementation of Windows support for the geolocator plugin. -------------------------------------------------------------------------------- /geolocator_windows/example/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_windows/example/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /geolocator_android/example/res/images/baseflow_logo_def_light-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_android/example/res/images/baseflow_logo_def_light-02.png -------------------------------------------------------------------------------- /geolocator_android/example/res/images/poweredByBaseflowLogoLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_android/example/res/images/poweredByBaseflowLogoLight.png -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /geolocator_web/example/res/images/poweredByBaseflowLogoLight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_web/example/res/images/poweredByBaseflowLogoLight@2x.png -------------------------------------------------------------------------------- /geolocator_web/example/res/images/poweredByBaseflowLogoLight@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_web/example/res/images/poweredByBaseflowLogoLight@3x.png -------------------------------------------------------------------------------- /geolocator_windows/example/res/images/baseflow_logo_def_light-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_windows/example/res/images/baseflow_logo_def_light-02.png -------------------------------------------------------------------------------- /geolocator_windows/example/res/images/poweredByBaseflowLogoLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_windows/example/res/images/poweredByBaseflowLogoLight.png -------------------------------------------------------------------------------- /geolocator/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /geolocator/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /geolocator/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip -------------------------------------------------------------------------------- /geolocator_android/example/res/images/poweredByBaseflowLogoLight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_android/example/res/images/poweredByBaseflowLogoLight@2x.png -------------------------------------------------------------------------------- /geolocator_android/example/res/images/poweredByBaseflowLogoLight@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_android/example/res/images/poweredByBaseflowLogoLight@3x.png -------------------------------------------------------------------------------- /geolocator_apple/example/res/images/poweredByBaseflowLogoLight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/res/images/poweredByBaseflowLogoLight@2x.png -------------------------------------------------------------------------------- /geolocator_apple/example/res/images/poweredByBaseflowLogoLight@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/res/images/poweredByBaseflowLogoLight@3x.png -------------------------------------------------------------------------------- /geolocator_linux/example/res/images/poweredByBaseflowLogoLight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_linux/example/res/images/poweredByBaseflowLogoLight@2x.png -------------------------------------------------------------------------------- /geolocator_linux/example/res/images/poweredByBaseflowLogoLight@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_linux/example/res/images/poweredByBaseflowLogoLight@3x.png -------------------------------------------------------------------------------- /geolocator_windows/example/res/images/poweredByBaseflowLogoLight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_windows/example/res/images/poweredByBaseflowLogoLight@2x.png -------------------------------------------------------------------------------- /geolocator_windows/example/res/images/poweredByBaseflowLogoLight@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_windows/example/res/images/poweredByBaseflowLogoLight@3x.png -------------------------------------------------------------------------------- /geolocator/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /geolocator/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /geolocator/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/enums/enums.dart: -------------------------------------------------------------------------------- 1 | export 'location_accuracy.dart'; 2 | export 'location_accuracy_status.dart'; 3 | export 'location_permission.dart'; 4 | export 'location_service.dart'; 5 | -------------------------------------------------------------------------------- /geolocator_web/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_web/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/location/ServiceStatus.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.location; 2 | 3 | public enum ServiceStatus { 4 | disabled, 5 | enabled 6 | } 7 | -------------------------------------------------------------------------------- /geolocator_apple/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip -------------------------------------------------------------------------------- /geolocator_linux/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_linux/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/errors/PermissionUndefinedException.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.errors; 2 | 3 | public class PermissionUndefinedException extends Exception {} 4 | -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /geolocator_android/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_android/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip -------------------------------------------------------------------------------- /geolocator_windows/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_windows/example/res/images/poweredByBaseflowLogoLight_2020-06-23.zip -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/GeolocatorPlugin.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_OSX 2 | #import 3 | #else 4 | #import 5 | #endif 6 | 7 | @interface GeolocatorPlugin : NSObject 8 | @end 9 | -------------------------------------------------------------------------------- /geolocator/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 3 | #include "Generated.xcconfig" 4 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/location/NotificationImportance.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.location; 2 | 3 | public enum NotificationImportance { 4 | Default, 5 | High, 6 | Max, 7 | } 8 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /geolocator_linux/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.1.2 2 | 3 | - Migrates to Dart SDK 2.15.0 and Flutter 2.8.0. 4 | 5 | ## 0.1.1 6 | 7 | - Fixes repository URL of the package. 8 | 9 | ## 0.1.0 10 | 11 | - Initial implementation for Linux. 12 | -------------------------------------------------------------------------------- /geolocator_linux/example/linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /geolocator/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 3 | #include "Generated.xcconfig" 4 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 3 | #include "Generated.xcconfig" 4 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/errors/ErrorCallback.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.errors; 2 | 3 | @FunctionalInterface 4 | public interface ErrorCallback { 5 | void onError(ErrorCodes errorCode); 6 | } 7 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 3 | #include "Generated.xcconfig" 4 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zverik/flutter-geolocator/main/geolocator_apple/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /geolocator_linux/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | # Below is a list of people and organizations that have contributed 3 | # to the Flutter project. Names should be added to the list like so: 4 | # 5 | # Name/Organization 6 | 7 | J-P Nurmi 8 | -------------------------------------------------------------------------------- /geolocator/example/android/app/src/main/java/com/baseflow/geolocator_example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator_example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /geolocator/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | exclude: 5 | # Ignore generated files 6 | - '**/*.g.dart' 7 | - 'lib/src/generated/*.dart' 8 | linter: 9 | rules: 10 | - public_member_api_docs -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/main/java/com/baseflow/geolocator_example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator_example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /geolocator_apple/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | exclude: 5 | # Ignore generated files 6 | - '**/*.g.dart' 7 | - 'lib/src/generated/*.dart' 8 | linter: 9 | rules: 10 | - public_member_api_docs -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/geolocator_platform_interface.dart: -------------------------------------------------------------------------------- 1 | export 'src/enums/enums.dart'; 2 | export 'src/errors/errors.dart'; 3 | export 'src/geolocator_platform_interface.dart'; 4 | export 'src/extensions/extensions.dart'; 5 | export 'src/models/models.dart'; 6 | -------------------------------------------------------------------------------- /geolocator_web/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | exclude: 5 | # Ignore generated files 6 | - '**/*.g.dart' 7 | - 'lib/src/generated/*.dart' 8 | linter: 9 | rules: 10 | - public_member_api_docs -------------------------------------------------------------------------------- /geolocator_android/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | exclude: 5 | # Ignore generated files 6 | - '**/*.g.dart' 7 | - 'lib/src/generated/*.dart' 8 | linter: 9 | rules: 10 | - public_member_api_docs -------------------------------------------------------------------------------- /geolocator_windows/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | # Below is a list of people and organizations that have contributed 3 | # to the Flutter project. Names should be added to the list like so: 4 | # 5 | # Name/Organization 6 | 7 | Alexandre Zollinger Chohfi -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/location/LocationAccuracy.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.location; 2 | 3 | public enum LocationAccuracy { 4 | lowest, 5 | low, 6 | medium, 7 | high, 8 | best, 9 | bestForNavigation 10 | } 11 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/permission/PermissionResultCallback.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.permission; 2 | 3 | @FunctionalInterface 4 | public interface PermissionResultCallback { 5 | void onResult(LocationPermission permission); 6 | } 7 | -------------------------------------------------------------------------------- /geolocator_platform_interface/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | exclude: 5 | # Ignore generated files 6 | - '**/*.g.dart' 7 | - 'lib/src/generated/*.dart' 8 | linter: 9 | rules: 10 | - public_member_api_docs -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /geolocator_android/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | # Below is a list of people and organizations that have contributed 3 | # to the Flutter project. Names should be added to the list like so: 4 | # 5 | # Name/Organization 6 | 7 | Baseflow 8 | Maurits van Beusekom -------------------------------------------------------------------------------- /geolocator_apple/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | # Below is a list of people and organizations that have contributed 3 | # to the Flutter project. Names should be added to the list like so: 4 | # 5 | # Name/Organization 6 | 7 | Baseflow 8 | Maurits van Beusekom -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /geolocator/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 12 09:15:23 CEST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/location/PositionChangedCallback.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.location; 2 | 3 | import android.location.Location; 4 | 5 | @FunctionalInterface 6 | public interface PositionChangedCallback { 7 | void onPositionChanged(Location location); 8 | } 9 | -------------------------------------------------------------------------------- /geolocator_android/example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 12 09:15:23 CEST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 7 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/e-question.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: 💬 Questions and Help 4 | about: If you have questions, please use this for support 5 | --- 6 | 7 | ## 💬 Questions and Help 8 | 9 | For questions or help we recommend checking: 10 | 11 | - The [Flutter tag in Stack Overflow](https://stackoverflow.com/questions/tagged/flutter) -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/ServiceStatus.h: -------------------------------------------------------------------------------- 1 | // 2 | // ServiceStatus.h 3 | // Pods 4 | // 5 | // Created by Floris Smit on 03/06/2021. 6 | // 7 | 8 | #ifndef ServiceStatus_h 9 | #define ServiceStatus_h 10 | 11 | typedef enum { 12 | disabled, 13 | enabled 14 | } ServiceStatus; 15 | 16 | #endif /* ServiceStatus_h */ 17 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 7a4c33425ddd78c54aba07d86f3f9a4a0051769b 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/enums/location_service.dart: -------------------------------------------------------------------------------- 1 | /// Describes the current state of the location service on the native platform. 2 | enum ServiceStatus { 3 | /// Indicates that the location service on the native platform is enabled. 4 | disabled, 5 | 6 | /// Indicates that the location service on the native platform is enabled. 7 | enabled, 8 | } 9 | -------------------------------------------------------------------------------- /geolocator/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/location/LocationAccuracyStatus.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.location; 2 | 3 | public enum LocationAccuracyStatus { 4 | /// A approximate location will be returned (Approximate location). 5 | reduced, 6 | 7 | /// The precise location of the device will be returned. 8 | precise, 9 | } 10 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/ActivityTypeMapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityTypeMapper.h 3 | // Pods 4 | // 5 | // Created by floris smit on 30/07/2021. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface ActivityTypeMapper : NSObject 12 | + (CLActivityType)toCLActivityType:(NSNumber *)value; 13 | @end 14 | -------------------------------------------------------------------------------- /geolocator/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /geolocator_apple/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: f4abaa0735eba4dfd8f33f73363911d63931fe03 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/LocationMapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // LocationMapper.h 3 | // Pods 4 | // 5 | // Created by Maurits van Beusekom on 23/06/2020. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface LocationMapper : NSObject 12 | + (NSDictionary *) toDictionary: (CLLocation *)location; 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /geolocator_linux/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 7e9793dee1b85a243edd0e06cb1658e98b077561 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /geolocator_web/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /geolocator_android/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /geolocator_apple/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /geolocator_linux/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /geolocator_windows/example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: e6b34c2b5c96bb95325269a29a84e83ed8909b5f 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/PermissionUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // PermissionUtils.h 3 | // Pods 4 | // 5 | // Created by Maurits van Beusekom on 27/08/2021. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface PermissionUtils : NSObject 12 | + (BOOL) isStatusGranted: (CLAuthorizationStatus) authorizationStatus; 13 | @end 14 | -------------------------------------------------------------------------------- /geolocator/example/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/LocationAccuracyMapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // LocationAccuracyParser.h 3 | // geolocator 4 | // 5 | // Created by Maurits van Beusekom on 06/07/2020. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface LocationAccuracyMapper : NSObject 12 | + (CLLocationAccuracy)toCLLocationAccuracy:(NSNumber *)value; 13 | @end 14 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/LocationDistanceMapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // LocationDistanceFilterMapper.h 3 | // Pods 4 | // 5 | // Created by Maurits van Beusekom on 06/07/2020. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface LocationDistanceMapper : NSObject 12 | + (CLLocationDistance)toCLLocationDistance:(NSNumber *)value; 13 | @end 14 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.personal-information.location 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.personal-information.location 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /geolocator_windows/example/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /geolocator/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /geolocator/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/AuthorizationStatusMapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // AuthorizationStatusMapper.h 3 | // Pods 4 | // 5 | // Created by Maurits van Beusekom on 23/06/2020. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface AuthorizationStatusMapper : NSObject 12 | + (NSNumber *) toDartIndex: (CLAuthorizationStatus) authorizationStatus; 13 | @end 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/b-bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: 🐛 Bug Report 4 | about: Create a report to help us fix bugs and make improvements 5 | --- 6 | 7 | ## 🐛 Bug Report 8 | 9 | 10 | 11 | ### Expected behavior 12 | 13 | ### Reproduction steps 14 | 15 | ### Configuration 16 | 17 | **Version:** 1.x 18 | 19 | **Platform:** 20 | - [ ] :iphone: iOS 21 | - [ ] :robot: Android -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /geolocator/example/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /geolocator_linux/example/linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/location/LocationServiceListener.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.location; 2 | 3 | import com.baseflow.geolocator.errors.ErrorCodes; 4 | 5 | import io.flutter.plugin.common.MethodChannel; 6 | 7 | public interface LocationServiceListener { 8 | void onLocationServiceResult(boolean isEnabled); 9 | 10 | void onLocationServiceError(ErrorCodes errorCode); 11 | } 12 | -------------------------------------------------------------------------------- /geolocator_windows/example/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/errors/errors.dart: -------------------------------------------------------------------------------- 1 | export 'activity_missing_exception.dart'; 2 | export 'already_subscribed_exception.dart'; 3 | export 'invalid_permission_exception.dart'; 4 | export 'location_service_disabled_exception.dart'; 5 | export 'permission_definitions_not_found_exception.dart'; 6 | export 'permission_denied_exception.dart'; 7 | export 'permission_request_in_progress_exception.dart'; 8 | export 'position_update_exception.dart'; 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/a-regression.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: 🔙 Regression 4 | about: Report unexpected behavior that worked previously 5 | --- 6 | 7 | ## 🔙 Regression 8 | 9 | 10 | 11 | ### Old (and correct) behavior 12 | 13 | ### Current behavior 14 | 15 | ### Reproduction steps 16 | 17 | ### Configuration 18 | 19 | **Version:** 1.x 20 | 21 | **Platform:** 22 | - [ ] :iphone: iOS 23 | - [ ] :robot: Android -------------------------------------------------------------------------------- /geolocator/example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import geolocator_apple 9 | import url_launcher_macos 10 | 11 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 12 | GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) 13 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 14 | } 15 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import geolocator_apple 9 | import url_launcher_macos 10 | 11 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 12 | GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) 13 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 14 | } 15 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/LocationDistanceMapper.m: -------------------------------------------------------------------------------- 1 | // 2 | // LocationDistanceMapper.m 3 | // geolocator 4 | // 5 | // Created by Maurits van Beusekom on 06/07/2020. 6 | // 7 | 8 | #import "LocationDistanceMapper.h" 9 | 10 | @implementation LocationDistanceMapper 11 | 12 | +(CLLocationDistance)toCLLocationDistance:(NSNumber *)value { 13 | if (!value) return kCLDistanceFilterNone; 14 | 15 | return value > 0 ? value.doubleValue : kCLDistanceFilterNone; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/d-enhancement-proposal.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: 🏗 Enhancement Proposal 4 | about: Proposals for code cleanup, refactor and improvements in general 5 | --- 6 | 7 | ## 🏗 Enhancement Proposal 8 | 9 | 10 | 11 | ### Pitch 12 | 13 | 14 | 15 | ### Platforms affected (mark all that apply) 16 | - [ ] :iphone: iOS 17 | - [ ] :robot: Android -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/errors/location_service_disabled_exception.dart: -------------------------------------------------------------------------------- 1 | /// An exception thrown when trying to access the device's location 2 | /// information while the location service on the device is disabled. 3 | class LocationServiceDisabledException implements Exception { 4 | /// Constructs the [LocationServiceDisabledException] 5 | const LocationServiceDisabledException(); 6 | 7 | @override 8 | String toString() => 'The location service on the device is disabled.'; 9 | } 10 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /geolocator_linux/example/linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /geolocator_windows/windows/geolocator_windows.cpp: -------------------------------------------------------------------------------- 1 | #include "include/geolocator_windows/geolocator_windows.h" 2 | 3 | #include 4 | 5 | #include "geolocator_plugin.h" 6 | 7 | void GeolocatorWindowsRegisterWithRegistrar( 8 | FlutterDesktopPluginRegistrarRef registrar) { 9 | geolocator_plugin::GeolocatorPlugin::RegisterWithRegistrar( 10 | flutter::PluginRegistrarManager::GetInstance() 11 | ->GetRegistrar(registrar)); 12 | } 13 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/enums/location_accuracy_status.dart: -------------------------------------------------------------------------------- 1 | /// Represent the current Location Accuracy Status on iOS 14.0 and higher. 2 | enum LocationAccuracyStatus { 3 | /// A approximate location will be returned (Approximate location). 4 | reduced, 5 | 6 | /// The precise location of the device will be returned. 7 | precise, 8 | 9 | /// When an Android device is used, an 'unknown' status is returned, since 10 | /// Android does not support Approximate Location yet. 11 | unknown, 12 | } 13 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | com.apple.security.personal-information.location 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /geolocator/example/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | com.apple.security.personal-information.location 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Handlers/GeolocationHandler_Test.h: -------------------------------------------------------------------------------- 1 | // This header is available in the Test module. Import via "@import geolocator_apple.Test;" 2 | 3 | #import 4 | 5 | /// Methods exposed for unit testing. 6 | @interface GeolocationHandler(Test) 7 | 8 | /// Overrides the CLLocationManager instance used by the GeolocationHandler. 9 | /// This should only be used for testing purposes. 10 | - (void)setLocationManagerOverride:(CLLocationManager *)locationManager; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /geolocator_windows/example/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /geolocator/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /geolocator/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /geolocator_web/example/README.md: -------------------------------------------------------------------------------- 1 | # geolocator_example 2 | 3 | Demonstrates how to directly use the geolocator_web package in a Flutter web application. 4 | 5 | ## Getting Started 6 | 7 | To run the example App take the following steps: 8 | 9 | 1. Change into the `geolocator_web/example` directory (assuming the current directory is the root of the repository execute `cd geolocator_web/example`); 10 | 2. Run `flutter pub get` to download all required dependencies; 11 | 3. Finally run `flutter run -d chrome` to run the example App in the Chrome browser. 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/c-feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: 🚀 Feature Request 4 | about: Want to see something new included in the Framework? Submit it! 5 | --- 6 | 7 | ## 🚀 Feature Requests 8 | 9 | 10 | 11 | ### Contextualize the feature 12 | 13 | 14 | ### Describe the feature 15 | 16 | 17 | ### Platforms affected (mark all that apply) 18 | - [ ] :iphone: iOS 19 | - [ ] :robot: Android -------------------------------------------------------------------------------- /geolocator_linux/example/linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/errors/already_subscribed_exception.dart: -------------------------------------------------------------------------------- 1 | /// An exception thrown when subscribing to receive positions while another 2 | /// subscription is already active. 3 | class AlreadySubscribedException implements Exception { 4 | /// Constructs the [AlreadySubscribedException] 5 | const AlreadySubscribedException(); 6 | 7 | @override 8 | String toString() => 9 | 'The App is already listening to a stream of position updates. It is not ' 10 | 'possible to listen to more then one stream at the same time.'; 11 | } 12 | -------------------------------------------------------------------------------- /geolocator/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Handlers/LocationServiceStreamHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // LocationServiceStreamHandler.h 3 | // Pods 4 | // 5 | // Created by Floris Smit on 10/06/2021. 6 | // 7 | 8 | #ifndef LocationServiceStreamHandler_h 9 | #define LocationServiceStreamHandler_h 10 | 11 | #if TARGET_OS_OSX 12 | #import 13 | #else 14 | #import 15 | #endif 16 | 17 | @interface LocationServiceStreamHandler : NSObject 18 | 19 | @end 20 | 21 | #endif /* LocationServiceStreamHandler_h */ 22 | -------------------------------------------------------------------------------- /geolocator/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /geolocator_android/example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /geolocator_apple/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /geolocator_linux/example/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 7 | ) 8 | 9 | set(PLUGIN_BUNDLED_LIBRARIES) 10 | 11 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 12 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 13 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 14 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 15 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 16 | endforeach(plugin) 17 | -------------------------------------------------------------------------------- /geolocator_windows/windows/geolocator_enums.h: -------------------------------------------------------------------------------- 1 | namespace geolocator_plugin { 2 | 3 | enum ErrorCode { 4 | PermissionDefinitionsNotFound 5 | }; 6 | 7 | enum LocationPermission { 8 | Denied, 9 | DeniedForever, 10 | WhileInUse, 11 | Always, 12 | UnableToDetermine 13 | }; 14 | 15 | enum LocationAccuracyStatus { 16 | Reduced, 17 | Precise 18 | }; 19 | 20 | enum LocationAccuracy { 21 | Lowest, 22 | Low, 23 | Medium, 24 | High, 25 | Best, 26 | BestForNavigation 27 | }; 28 | 29 | enum ServiceStatus { 30 | Disabled, 31 | Enabled 32 | }; 33 | 34 | } // namespace geolocator_plugin -------------------------------------------------------------------------------- /geolocator/example/windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | 12 | void RegisterPlugins(flutter::PluginRegistry* registry) { 13 | GeolocatorWindowsRegisterWithRegistrar( 14 | registry->GetRegistrarForPlugin("GeolocatorWindows")); 15 | UrlLauncherWindowsRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 17 | } 18 | -------------------------------------------------------------------------------- /geolocator_windows/example/windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | 12 | void RegisterPlugins(flutter::PluginRegistry* registry) { 13 | GeolocatorWindowsRegisterWithRegistrar( 14 | registry->GetRegistrarForPlugin("GeolocatorWindows")); 15 | UrlLauncherWindowsRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 17 | } 18 | -------------------------------------------------------------------------------- /geolocator_platform_interface/test/src/errors/location_service_disabled_exception_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 3 | 4 | void main() { 5 | test('toString: Should return a description of the exception', () { 6 | // Arrange 7 | const expected = 'The location service on the device is disabled.'; 8 | const exception = LocationServiceDisabledException(); 9 | 10 | // Act 11 | final actual = exception.toString(); 12 | 13 | // Assert 14 | expect(actual, expected); 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /geolocator/example/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | geolocator_windows 7 | url_launcher_windows 8 | ) 9 | 10 | set(PLUGIN_BUNDLED_LIBRARIES) 11 | 12 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 13 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 14 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 15 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 17 | endforeach(plugin) 18 | -------------------------------------------------------------------------------- /geolocator_windows/example/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | geolocator_windows 7 | url_launcher_windows 8 | ) 9 | 10 | set(PLUGIN_BUNDLED_LIBRARIES) 11 | 12 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 13 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 14 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 15 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 17 | endforeach(plugin) 18 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Constants/ErrorCodes.h: -------------------------------------------------------------------------------- 1 | // 2 | // ErrorCodes.h 3 | // Pods 4 | // 5 | // Created by Maurits van Beusekom on 24/06/2020. 6 | // 7 | 8 | FOUNDATION_EXPORT NSString * const GeolocatorErrorLocationUpdateFailure; 9 | FOUNDATION_EXPORT NSString * const GeolocatorErrorLocationServicesDisabled; 10 | FOUNDATION_EXPORT NSString * const GeolocatorErrorLocationSubscriptionActive; 11 | FOUNDATION_EXPORT NSString * const GeolocatorErrorPermissionDefinitionsNotFound; 12 | FOUNDATION_EXPORT NSString * const GeolocatorErrorPermissionDenied; 13 | FOUNDATION_EXPORT NSString * const GeolocatorErrorPermissionRequestInProgress; 14 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Handlers/PositionStreamHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // PositionStreamHandler.h 3 | // Pods 4 | // 5 | // Created by Maurits van Beusekom on 04/06/2021. 6 | // 7 | 8 | #ifndef PositionStreamHandler_h 9 | #define PositionStreamHandler_h 10 | 11 | #if TARGET_OS_OSX 12 | #import 13 | #else 14 | #import 15 | #endif 16 | #import "GeolocationHandler.h" 17 | 18 | @interface PositionStreamHandler : NSObject 19 | 20 | - (id) initWithGeolocationHandler: (GeolocationHandler *)geolocationHandler; 21 | 22 | @end 23 | 24 | #endif /* PositionStreamHandler_h */ 25 | -------------------------------------------------------------------------------- /geolocator/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:4.1.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /geolocator_android/example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:7.1.2' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /geolocator/example/README.md: -------------------------------------------------------------------------------- 1 | # geolocator_example 2 | 3 | Demonstrates how to use the geolocator plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/errors/position_update_exception.dart: -------------------------------------------------------------------------------- 1 | /// An exception thrown when something went wrong while listening for position 2 | /// updates. 3 | class PositionUpdateException implements Exception { 4 | /// Constructs the [PositionUpdateException] 5 | const PositionUpdateException(this.message); 6 | 7 | /// A [message] describing more details on the update exception 8 | final String? message; 9 | 10 | @override 11 | String toString() { 12 | if (message == null || message == '') { 13 | return 'Something went wrong while listening for position updates.'; 14 | } 15 | 16 | return message!; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /geolocator_linux/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | .vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 25 | /pubspec.lock 26 | **/doc/api/ 27 | .dart_tool/ 28 | .packages 29 | build/ 30 | -------------------------------------------------------------------------------- /geolocator_apple/example/README.md: -------------------------------------------------------------------------------- 1 | # geolocator_ios_example 2 | 3 | Demonstrates how to use the geolocator_ios plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /geolocator/example/windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /geolocator_android/example/README.md: -------------------------------------------------------------------------------- 1 | # geolocator_android_example 2 | 3 | Demonstrates how to use the geolocator_android plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/errors/permission_denied_exception.dart: -------------------------------------------------------------------------------- 1 | /// An exception thrown when trying to access the device's location 2 | /// information while access is denied. 3 | class PermissionDeniedException implements Exception { 4 | /// Constructs the [PermissionDeniedException] 5 | const PermissionDeniedException(this.message); 6 | 7 | /// A [message] describing more details on the denied permission. 8 | final String? message; 9 | 10 | @override 11 | String toString() { 12 | if (message == null || message == '') { 13 | return 'Access to the location of the device is denied by the user.'; 14 | } 15 | return message!; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /geolocator_windows/example/README.md: -------------------------------------------------------------------------------- 1 | # geolocator_windows_example 2 | 3 | Demonstrates how to use the geolocator_windows plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /geolocator_windows/example/windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /geolocator/example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /geolocator_web/example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.baseflow.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2021 com.baseflow. All rights reserved. 15 | -------------------------------------------------------------------------------- /geolocator/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/errors/invalid_permission_exception.dart: -------------------------------------------------------------------------------- 1 | /// An exception thrown when trying to convert a unknown permission into 2 | /// the LocationPermission enum. 3 | class InvalidPermissionException implements Exception { 4 | /// Constructs the [InvalidPermissionException] 5 | const InvalidPermissionException(this.valueToConvert); 6 | 7 | /// The [valueToConvert] contains the value that was tried to be converted 8 | /// into a LocationPermission. 9 | final int valueToConvert; 10 | 11 | @override 12 | String toString() { 13 | // ignore: lines_longer_than_80_chars 14 | return 'Unable to convert the value "$valueToConvert" into a LocationPermission.'; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /geolocator_platform_interface/test/src/errors/already_subscribed_exception_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 3 | 4 | void main() { 5 | test('toString: Should return a description of the exception', () { 6 | // Arrange 7 | const expected = 'The App is already listening to a stream of position ' 8 | 'updates. It is not possible to listen to more then one stream at the ' 9 | 'same time.'; 10 | const exception = AlreadySubscribedException(); 11 | 12 | // Act 13 | final actual = exception.toString(); 14 | 15 | // Assert 16 | expect(actual, expected); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = geolocator_apple_example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.baseflow.geolocatorAppleExample 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2021 com.baseflow. All rights reserved. 15 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Constants/ErrorCodes.m: -------------------------------------------------------------------------------- 1 | // 2 | // ErrorCodes.m 3 | // geolocator 4 | // 5 | // Created by Maurits van Beusekom on 24/06/2020. 6 | // 7 | 8 | #import "ErrorCodes.h" 9 | 10 | NSString * const GeolocatorErrorLocationUpdateFailure = @"LOCATION_UPDATE_FAILURE"; 11 | NSString * const GeolocatorErrorLocationServicesDisabled = @"LOCATION_SERVICES_DISABLED"; 12 | NSString * const GeolocatorErrorLocationSubscriptionActive = @"LOCATION_SUBSCRIPTION_ACTIVE"; 13 | NSString * const GeolocatorErrorPermissionDefinitionsNotFound = @"PERMISSION_DEFINITIONS_NOT_FOUND"; 14 | NSString * const GeolocatorErrorPermissionDenied = @"PERMISSION_DENIED"; 15 | NSString * const GeolocatorErrorPermissionRequestInProgress = @"PERMISSION_REQUEST_IN_PROGRESS"; 16 | -------------------------------------------------------------------------------- /geolocator/example/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /geolocator_apple/lib/geolocator_apple.dart: -------------------------------------------------------------------------------- 1 | export 'package:geolocator_platform_interface/geolocator_platform_interface.dart' 2 | show 3 | ActivityMissingException, 4 | AlreadySubscribedException, 5 | InvalidPermissionException, 6 | LocationAccuracy, 7 | LocationAccuracyStatus, 8 | LocationPermission, 9 | LocationServiceDisabledException, 10 | LocationSettings, 11 | PermissionDefinitionsNotFoundException, 12 | PermissionDeniedException, 13 | PermissionRequestInProgressException, 14 | Position, 15 | PositionUpdateException, 16 | ServiceStatus; 17 | 18 | export 'src/geolocator_apple.dart'; 19 | export 'src/types/activity_type.dart'; 20 | export 'src/types/apple_settings.dart'; 21 | -------------------------------------------------------------------------------- /geolocator_windows/example/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/errors/permission_request_in_progress_exception.dart: -------------------------------------------------------------------------------- 1 | /// An exception thrown when requesting location permissions while an earlier 2 | /// request has not yet been completed. 3 | class PermissionRequestInProgressException implements Exception { 4 | /// Constructs the [PermissionRequestInProgressException] 5 | const PermissionRequestInProgressException(this.message); 6 | 7 | /// A [message] describing more details on the denied permission. 8 | final String? message; 9 | 10 | @override 11 | String toString() { 12 | if (message == null || message == '') { 13 | return 'A request for location permissions is already running, please ' 14 | 'wait for it to complete before doing another request.'; 15 | } 16 | return message!; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Handlers/PermissionHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // PermissionHandler.h 3 | // Pods 4 | // 5 | // Created by Maurits van Beusekom on 26/06/2020. 6 | // 7 | 8 | #ifndef PermissionHandler_h 9 | #define PermissionHandler_h 10 | 11 | #import 12 | #import 13 | 14 | typedef void (^PermissionConfirmation)(CLAuthorizationStatus status); 15 | typedef void (^PermissionError)(NSString *errorCode, NSString *errorDiscription); 16 | 17 | @interface PermissionHandler : NSObject 18 | 19 | - (CLAuthorizationStatus) checkPermission; 20 | - (BOOL) hasPermission; 21 | - (void) requestPermission:(PermissionConfirmation)confirmationHandler 22 | errorHandler:(PermissionError)errorHandler; 23 | 24 | @end 25 | 26 | #endif /* PermissionHandler_h */ 27 | -------------------------------------------------------------------------------- /geolocator_platform_interface/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: geolocator_platform_interface 2 | description: A common platform interface for the geolocator plugin. 3 | repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_platform_interface 4 | # NOTE: We strongly prefer non-breaking changes, even at the expense of a 5 | # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes 6 | version: 4.0.6 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | 12 | plugin_platform_interface: ^2.1.1 13 | vector_math: ^2.1.0 14 | meta: ^1.3.0 15 | 16 | dev_dependencies: 17 | async: ^2.8.1 18 | flutter_test: 19 | sdk: flutter 20 | flutter_lints: ^1.0.4 21 | mockito: ^5.0.0-nullsafety.7 22 | 23 | environment: 24 | sdk: ">=2.15.0 <3.0.0" 25 | flutter: ">=2.8.0" 26 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/location/FlutterLocationServiceListener.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.location; 2 | 3 | import com.baseflow.geolocator.errors.ErrorCodes; 4 | 5 | import io.flutter.plugin.common.MethodChannel; 6 | 7 | public class FlutterLocationServiceListener implements LocationServiceListener { 8 | private MethodChannel.Result result; 9 | 10 | public FlutterLocationServiceListener(MethodChannel.Result result) { 11 | this.result = result; 12 | } 13 | 14 | @Override 15 | public void onLocationServiceResult(boolean isEnabled) { 16 | result.success(isEnabled); 17 | } 18 | 19 | @Override 20 | public void onLocationServiceError(ErrorCodes errorCode) { 21 | result.error(errorCode.toString(), errorCode.toDescription(), null); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /geolocator_apple/lib/src/types/activity_type.dart: -------------------------------------------------------------------------------- 1 | /// Represents the possible iOS activity types. 2 | enum ActivityType { 3 | /// The location manager is being used specifically during vehicular 4 | /// navigation to track location changes to the automobile. 5 | automotiveNavigation, 6 | 7 | /// The location manager is being used to track fitness activities such as 8 | /// walking, running, cycling, and so on. 9 | fitness, 10 | 11 | /// The location manager is being used to track movements for other types of 12 | /// vehicular navigation that are not automobile related. 13 | otherNavigation, 14 | 15 | /// The location manager is being used specifically during 16 | /// airborne activities. 17 | airborne, 18 | 19 | /// The location manager is being used for an unknown activity. 20 | other, 21 | } 22 | -------------------------------------------------------------------------------- /geolocator_web/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: geolocator_web 2 | description: Official web implementation of the geolocator plugin. 3 | repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_web 4 | issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen 5 | version: 2.1.6 6 | 7 | flutter: 8 | plugin: 9 | platforms: 10 | web: 11 | pluginClass: GeolocatorPlugin 12 | fileName: geolocator_web.dart 13 | 14 | dependencies: 15 | flutter: 16 | sdk: flutter 17 | flutter_web_plugins: 18 | sdk: flutter 19 | geolocator_platform_interface: ^4.0.1 20 | 21 | dev_dependencies: 22 | flutter_test: 23 | sdk: flutter 24 | flutter_lints: ^1.0.4 25 | mockito: ^5.0.0 26 | 27 | environment: 28 | sdk: '>=2.15.0 <3.0.0' 29 | flutter: ">=2.8.0" 30 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Handlers/LocationAccuracyHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // LocationAccuracyHandler.h 3 | // Pods 4 | // 5 | // Created by Floris Smit on 18/06/2021. 6 | // 7 | 8 | #ifndef LocationAccuracyHandler_h 9 | #define LocationAccuracyHandler_h 10 | 11 | #if TARGET_OS_OSX 12 | #import 13 | #else 14 | #import 15 | #endif 16 | 17 | typedef enum { 18 | reduced, 19 | precise 20 | } LocationAccuracy; 21 | 22 | @interface LocationAccuracyHandler : NSObject 23 | 24 | - (void) getLocationAccuracyWithResult:(FlutterResult _Nonnull)result; 25 | - (void) requestTemporaryFullAccuracyWithResult:(FlutterResult _Nonnull)result 26 | purposeKey:(NSString * _Nullable)purposeKey; 27 | 28 | @end 29 | 30 | #endif /* LocationAccuracyHandler_h */ 31 | -------------------------------------------------------------------------------- /geolocator_platform_interface/test/src/enums/location_permission_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 3 | 4 | void main() { 5 | test('LocationPermission should contain 4 options', () { 6 | const values = LocationPermission.values; 7 | 8 | expect(values.length, 5); 9 | }); 10 | 11 | test('LocationPermission enum should have items in correct index', () { 12 | const values = LocationPermission.values; 13 | 14 | expect(values[0], LocationPermission.denied); 15 | expect(values[1], LocationPermission.deniedForever); 16 | expect(values[2], LocationPermission.whileInUse); 17 | expect(values[3], LocationPermission.always); 18 | expect(values[4], LocationPermission.unableToDetermine); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/PermissionUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // PermissionUtils.m 3 | // geolocator 4 | // 5 | // Created by Maurits van Beusekom on 27/08/2021. 6 | // 7 | 8 | #import "PermissionUtils.h" 9 | 10 | @implementation PermissionUtils 11 | + (BOOL) isStatusGranted:(CLAuthorizationStatus)authorizationStatus { 12 | #if TARGET_OS_OSX 13 | if (@available(macOS 10.12, *)) { 14 | return (authorizationStatus == kCLAuthorizationStatusAuthorized || 15 | authorizationStatus == kCLAuthorizationStatusAuthorizedAlways); 16 | } else { 17 | return authorizationStatus == kCLAuthorizationStatusAuthorized; 18 | } 19 | #else 20 | return (authorizationStatus == kCLAuthorizationStatusAuthorizedAlways || 21 | authorizationStatus == kCLAuthorizationStatusAuthorizedWhenInUse); 22 | #endif 23 | } 24 | @end 25 | -------------------------------------------------------------------------------- /geolocator_windows/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: geolocator_windows 2 | description: Geolocation Windows plugin for Flutter. This plugin provides the Windows implementation for the geolocator. 3 | repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_windows 4 | issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen 5 | version: 0.1.1 6 | 7 | environment: 8 | sdk: ">=2.15.0 <3.0.0" 9 | flutter: ">=2.8.0" 10 | 11 | flutter: 12 | plugin: 13 | platforms: 14 | windows: 15 | pluginClass: GeolocatorWindows 16 | 17 | dependencies: 18 | flutter: 19 | sdk: flutter 20 | 21 | geolocator_platform_interface: ^4.0.0 22 | 23 | dev_dependencies: 24 | flutter_test: 25 | sdk: flutter 26 | flutter_lints: ^1.0.4 27 | mockito: ^5.0.17 28 | plugin_platform_interface: ^2.1.2 29 | -------------------------------------------------------------------------------- /geolocator_windows/windows/include/geolocator_windows/geolocator_windows.h: -------------------------------------------------------------------------------- 1 | #ifndef PACKAGES_GEOLOCATOR_GEOLOCATOR_WINDOWS_WINDOWS_INCLUDE_GEOLOCATOR_WINDOWS_GEOLOCATOR_plugin_H_ 2 | #define PACKAGES_GEOLOCATOR_GEOLOCATOR_WINDOWS_WINDOWS_INCLUDE_GEOLOCATOR_WINDOWS_GEOLOCATOR_plugin_H_ 3 | 4 | #include 5 | 6 | #ifdef FLUTTER_PLUGIN_IMPL 7 | #define FLUTTER_PLUGIN_EXPORT __declspec(dllexport) 8 | #else 9 | #define FLUTTER_PLUGIN_EXPORT __declspec(dllimport) 10 | #endif 11 | 12 | #if defined(__cplusplus) 13 | extern "C" { 14 | #endif 15 | 16 | FLUTTER_PLUGIN_EXPORT void GeolocatorWindowsRegisterWithRegistrar( 17 | FlutterDesktopPluginRegistrarRef registrar); 18 | 19 | #if defined(__cplusplus) 20 | } // extern "C" 21 | #endif 22 | 23 | #endif // PACKAGES_GEOLOCATOR_GEOLOCATOR_WINDOWS_WINDOWS_INCLUDE_GEOLOCATOR_WINDOWS_GEOLOCATOR_plugin_H_ 24 | -------------------------------------------------------------------------------- /geolocator_android/lib/geolocator_android.dart: -------------------------------------------------------------------------------- 1 | export 'package:geolocator_platform_interface/geolocator_platform_interface.dart' 2 | show 3 | ActivityMissingException, 4 | AlreadySubscribedException, 5 | InvalidPermissionException, 6 | LocationAccuracy, 7 | LocationAccuracyStatus, 8 | LocationPermission, 9 | LocationServiceDisabledException, 10 | LocationSettings, 11 | PermissionDefinitionsNotFoundException, 12 | PermissionDeniedException, 13 | PermissionRequestInProgressException, 14 | Position, 15 | PositionUpdateException, 16 | ServiceStatus; 17 | 18 | export 'src/geolocator_android.dart'; 19 | export 'src/types/android_settings.dart' show AndroidSettings; 20 | export 'src/types/foreground_settings.dart' 21 | show AndroidResource, ForegroundNotificationConfig; 22 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/GeolocatorPlugin.modulemap: -------------------------------------------------------------------------------- 1 | framework module geolocator_apple { 2 | umbrella header "geolocator-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | 7 | explicit module Private { 8 | header "ErrorCodes.h" 9 | header "GeolocationHandler.h" 10 | header "LocationAccuracyHandler.h" 11 | header "LocationServiceStreamHandler.h" 12 | header "PermissionHandler.h" 13 | header "PositionStreamHandler.h" 14 | header "ActivityTypeMapper.h" 15 | header "AuthorizationStatusMapper.h" 16 | header "LocationAccuracyMapper.h" 17 | header "LocationDistanceMapper.h" 18 | header "LocationMapper.h" 19 | header "PermissionUtils.h" 20 | header "ServiceStatus.h" 21 | } 22 | 23 | 24 | explicit module Test { 25 | header "GeolocationHandler_Test.h" 26 | header "GeolocatorPlugin_Test.h" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/AuthorizationStatusMapper.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLAuthorizationStatusMapper.m 3 | // geolocator 4 | // 5 | // Created by Maurits van Beusekom on 15/06/2020. 6 | // 7 | 8 | #import "AuthorizationStatusMapper.h" 9 | 10 | @implementation AuthorizationStatusMapper 11 | + (NSNumber *) toDartIndex: (CLAuthorizationStatus) authorizationStatus { 12 | switch (authorizationStatus) { 13 | case kCLAuthorizationStatusNotDetermined: 14 | case kCLAuthorizationStatusRestricted: 15 | return @0; 16 | case kCLAuthorizationStatusDenied: 17 | return @1; 18 | #if TARGET_OS_IOS 19 | case kCLAuthorizationStatusAuthorizedWhenInUse: 20 | return @2; 21 | #endif 22 | case kCLAuthorizationStatusAuthorizedAlways: 23 | return @3; 24 | default: 25 | return @0; 26 | } 27 | } 28 | @end 29 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/extensions/integer_extensions.dart: -------------------------------------------------------------------------------- 1 | import '../enums/enums.dart'; 2 | import '../errors/errors.dart'; 3 | 4 | /// Provides extension methods on the LocationAccuracy enum. 5 | extension IntergerExtensions on int { 6 | /// Tries to convert the int value to a LocationPermission enum value. 7 | /// 8 | /// Throws an InvalidPermissionException if the int value cannot be 9 | /// converted to a LocationPermission. 10 | LocationPermission toLocationPermission() { 11 | switch (this) { 12 | case 0: 13 | return LocationPermission.denied; 14 | case 1: 15 | return LocationPermission.deniedForever; 16 | case 2: 17 | return LocationPermission.whileInUse; 18 | case 3: 19 | return LocationPermission.always; 20 | default: 21 | throw InvalidPermissionException(this); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /geolocator/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /geolocator_platform_interface/test/src/enums/location_accuracy_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 3 | 4 | void main() { 5 | test('LocationAccuracy should contain 7 options', () { 6 | const values = LocationAccuracy.values; 7 | 8 | expect(values.length, 7); 9 | }); 10 | 11 | test("LocationAccuracy enum should have items in correct index", () { 12 | const values = LocationAccuracy.values; 13 | 14 | expect(values[0], LocationAccuracy.lowest); 15 | expect(values[1], LocationAccuracy.low); 16 | expect(values[2], LocationAccuracy.medium); 17 | expect(values[3], LocationAccuracy.high); 18 | expect(values[4], LocationAccuracy.best); 19 | expect(values[5], LocationAccuracy.bestForNavigation); 20 | expect(values[6], LocationAccuracy.reduced); 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /geolocator_apple/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /geolocator_linux/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /geolocator_web/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /geolocator_windows/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /geolocator/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /geolocator_android/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: geolocator_android 2 | description: Geolocation plugin for Flutter. This plugin provides the Android implementation for the geolocator. 3 | repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_android 4 | issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen 5 | version: 4.1.3 6 | 7 | environment: 8 | sdk: ">=2.15.0 <3.0.0" 9 | flutter: ">=2.8.0" 10 | 11 | flutter: 12 | plugin: 13 | platforms: 14 | android: 15 | package: com.baseflow.geolocator 16 | pluginClass: GeolocatorPlugin 17 | dartPluginClass: GeolocatorAndroid 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | geolocator_platform_interface: ^4.0.4 23 | 24 | dev_dependencies: 25 | async: ^2.8.2 26 | flutter_test: 27 | sdk: flutter 28 | flutter_lints: ^2.0.1 29 | mockito: ^5.2.0 30 | plugin_platform_interface: ^2.1.2 31 | -------------------------------------------------------------------------------- /geolocator_apple/example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /geolocator_android/android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.baseflow.geolocator' 2 | version '1.0' 3 | 4 | buildscript { 5 | repositories { 6 | google() 7 | mavenCentral() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:7.1.2' 12 | } 13 | } 14 | 15 | rootProject.allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | apply plugin: 'com.android.library' 23 | 24 | android { 25 | compileSdkVersion 33 26 | 27 | defaultConfig { 28 | minSdkVersion 16 29 | } 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | compileOptions { 34 | sourceCompatibility JavaVersion.VERSION_1_8 35 | targetCompatibility JavaVersion.VERSION_1_8 36 | } 37 | } 38 | 39 | dependencies { 40 | implementation 'com.google.android.gms:play-services-location:20.0.0' 41 | implementation 'androidx.core:core:1.8.0' 42 | } 43 | -------------------------------------------------------------------------------- /geolocator/example/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/errors/permission_definitions_not_found_exception.dart: -------------------------------------------------------------------------------- 1 | /// An exception thrown when the required platform specific permission 2 | /// definications could not be found (e.g. in the AndroidManifest.xml file on 3 | /// Android or in the Info.plist file on iOS). 4 | class PermissionDefinitionsNotFoundException implements Exception { 5 | /// Constructs the [PermissionDefinitionsNotFoundException] 6 | const PermissionDefinitionsNotFoundException(this.message); 7 | 8 | /// A [message] describing more details on the denied permission. 9 | final String? message; 10 | 11 | @override 12 | String toString() { 13 | if (message == null || message == '') { 14 | return 'Permission definitions are not found. Please make sure you have ' 15 | 'added the necessary definitions to the configuration file (e.g. ' 16 | 'the AndroidManifest.xml on Android or the Info.plist on iOS).'; 17 | } 18 | return message!; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /geolocator_windows/example/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /geolocator_linux/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: geolocator_linux 2 | description: Geolocation Linux plugin for Flutter. This plugin provides the 3 | Linux implementation for the geolocator. 4 | repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_linux 5 | issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen 6 | version: 0.1.2 7 | 8 | environment: 9 | sdk: ">=2.15.0 <3.0.0" 10 | flutter: ">=2.8.0" 11 | 12 | flutter: 13 | plugin: 14 | implements: geolocator 15 | platforms: 16 | linux: 17 | dartPluginClass: GeolocatorLinux 18 | 19 | dependencies: 20 | dbus: ^0.7.3 21 | flutter: 22 | sdk: flutter 23 | geoclue: ^0.1.0 24 | geolocator_platform_interface: ^4.0.0 25 | gsettings: ^0.2.5 26 | package_info_plus: ^1.4.2 27 | 28 | dev_dependencies: 29 | build_runner: ^2.1.8 30 | flutter_lints: ^1.0.4 31 | flutter_test: 32 | sdk: flutter 33 | mockito: ^5.0.17 34 | plugin_platform_interface: ^2.1.2 35 | -------------------------------------------------------------------------------- /geolocator_platform_interface/test/src/errors/invalid_permission_exception_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 3 | 4 | void main() { 5 | test( 6 | 'valueToConvert: Should return the value that should have been converted', 7 | () { 8 | // Arrange 9 | const expected = 5; 10 | const exception = InvalidPermissionException(expected); 11 | 12 | // Act 13 | final actual = exception.valueToConvert; 14 | 15 | // Assert 16 | expect(actual, expected); 17 | }); 18 | 19 | test('toString: Should return a description of the exception', () { 20 | // Arrange 21 | const expected = 22 | 'Unable to convert the value "5" into a LocationPermission.'; 23 | const exception = InvalidPermissionException(5); 24 | 25 | // Act 26 | final actual = exception.toString(); 27 | 28 | // Assert 29 | expect(actual, expected); 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # This file is understood by git 1.7.2+. 2 | 3 | # Windows specific files should always be crlf on checkout 4 | *.bat text eol=crlf 5 | *.cmd text eol=crlf 6 | *.ps1 text eol=crlf 7 | 8 | # Check out the following as ln always for osx/linux/cygwin 9 | *.sh text eol=lf 10 | 11 | # Opt in the following types to always normalize line endings 12 | # on checkin and always use native endings on checkout. 13 | *.config text 14 | *.cs text diff=csharp 15 | *.csproj text 16 | *.md text 17 | *.msbuild text 18 | *.nuspec text 19 | *.pp text 20 | *.ps1 text 21 | *.sln text 22 | *.tt text 23 | *.txt text 24 | *.xaml text 25 | *.xml text 26 | 27 | # Binary files 28 | *.bmp binary 29 | *.jpeg binary 30 | *.jpg binary 31 | *.nupkg binary 32 | *.png binary 33 | *.sdf binary 34 | 35 | *.java linguist-language=Dart 36 | *.kt linguist-language=Dart 37 | *.swift linguist-language=Dart 38 | *.m linguist-language=Dart 39 | *.h linguist-language=Dart 40 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### :sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...) 2 | 3 | 4 | ### :arrow_heading_down: What is the current behavior? 5 | 6 | 7 | ### :new: What is the new behavior (if this is a feature change)? 8 | 9 | 10 | ### :boom: Does this PR introduce a breaking change? 11 | 12 | 13 | ### :bug: Recommendations for testing 14 | 15 | 16 | ### :memo: Links to relevant issues/docs 17 | 18 | 19 | ### :thinking: Checklist before submitting 20 | 21 | - [ ] I made sure all projects build. 22 | - [ ] I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy](https://dart.dev/tools/pub/versioning). 23 | - [ ] I updated CHANGELOG.md to add a description of the change. 24 | - [ ] I followed the style guide lines ([code style guide](https://github.com/Baseflow/flutter-geolocator/blob/master/CONTRIBUTING.md)). 25 | - [ ] I updated the relevant documentation. 26 | - [ ] I rebased onto current `master`. 27 | -------------------------------------------------------------------------------- /geolocator_apple/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: geolocator_apple 2 | description: Geolocation Apple plugin for Flutter. This plugin provides the Apple implementation for the geolocator. 3 | repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_apple 4 | issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen 5 | version: 2.2.2 6 | 7 | environment: 8 | sdk: ">=2.15.0 <3.0.0" 9 | flutter: ">=2.8.0" 10 | 11 | flutter: 12 | plugin: 13 | platforms: 14 | ios: 15 | pluginClass: GeolocatorPlugin 16 | dartPluginClass: GeolocatorApple 17 | macos: 18 | pluginClass: GeolocatorPlugin 19 | dartPluginClass: GeolocatorApple 20 | 21 | dependencies: 22 | flutter: 23 | sdk: flutter 24 | 25 | geolocator_platform_interface: ^4.0.5 26 | 27 | dev_dependencies: 28 | async: ^2.8.2 29 | flutter_test: 30 | sdk: flutter 31 | flutter_lints: ^2.0.1 32 | mockito: ^5.2.0 33 | plugin_platform_interface: ^2.1.2 34 | -------------------------------------------------------------------------------- /geolocator_linux/lib/src/geolocator_gnome.dart: -------------------------------------------------------------------------------- 1 | import 'package:geoclue/geoclue.dart'; 2 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 3 | import 'package:gsettings/gsettings.dart'; 4 | 5 | import 'geolocator_linux.dart'; 6 | 7 | class GeolocatorGnome extends GeolocatorLinux { 8 | GeolocatorGnome(GeoClueManager manager, {GSettings? settings}) 9 | : _settings = settings ?? GSettings('org.gnome.system.location'), 10 | super(manager); 11 | 12 | final GSettings _settings; 13 | 14 | @override 15 | Stream getServiceStatusStream() { 16 | return _settings.keysChanged 17 | .asBroadcastStream() 18 | .where((keys) => keys.contains('enabled')) 19 | .asyncMap((_) => isLocationServiceEnabled()) 20 | .map((v) => v ? ServiceStatus.enabled : ServiceStatus.disabled); 21 | } 22 | 23 | @override 24 | Future isLocationServiceEnabled() { 25 | return _settings.get('enabled').then((value) => value.toNative()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/location/AndroidIconResource.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.location; 2 | 3 | import java.util.Map; 4 | 5 | public class AndroidIconResource { 6 | private final String name; 7 | private final String defType; 8 | 9 | public static AndroidIconResource parseArguments(Map arguments) { 10 | if (arguments == null) { 11 | return null; 12 | } 13 | 14 | final String name = (String) arguments.get("name"); 15 | final String defType = (String) arguments.get("defType"); 16 | 17 | return new AndroidIconResource( 18 | name, 19 | defType); 20 | } 21 | 22 | private AndroidIconResource(String name, String defType) { 23 | this.name = name; 24 | this.defType = defType; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public String getDefType() { 32 | return defType; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/enums/location_accuracy.dart: -------------------------------------------------------------------------------- 1 | /// Represent the possible location accuracy values. 2 | enum LocationAccuracy { 3 | /// Location is accurate within a distance of 3000m on iOS and 500m on Android 4 | lowest, 5 | 6 | /// Location is accurate within a distance of 1000m on iOS and 500m on Android 7 | low, 8 | 9 | /// Location is accurate within a distance of 100m on iOS and between 100m and 10 | /// 500m on Android 11 | medium, 12 | 13 | /// Location is accurate within a distance of 10m on iOS and between 0m and 14 | /// 100m on Android 15 | high, 16 | 17 | /// Location is accurate within a distance of ~0m on iOS and between 0m and 18 | /// 100m on Android 19 | best, 20 | 21 | /// Location accuracy is optimized for navigation on iOS and matches the 22 | /// [LocationAccuracy.best] on Android 23 | bestForNavigation, 24 | 25 | /// Location accuracy is reduced for iOS 14+ devices, matches the 26 | /// [LocationAccuracy.lowest] on iOS 13 and below and all other platforms. 27 | reduced, 28 | } 29 | -------------------------------------------------------------------------------- /geolocator/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/errors/activity_missing_exception.dart: -------------------------------------------------------------------------------- 1 | /// An exception thrown when executing functionality which requires an Android 2 | /// while no activity is provided. 3 | /// 4 | /// This exception is thrown on Android only and might occur hen running a 5 | /// certain function from the background that requires a UI element (e.g. 6 | /// requesting permissions or enabling the location services). 7 | class ActivityMissingException implements Exception { 8 | /// Constructs the [ActivityMissingException] 9 | const ActivityMissingException(this.message); 10 | 11 | /// A [message] describing more details on the missing activity. 12 | final String? message; 13 | 14 | @override 15 | String toString() { 16 | if (message == null || message == '') { 17 | return 'Activity is missing. This might happen when running a certain ' 18 | 'function from the background that requires a UI element (e.g. ' 19 | 'requesting permissions or enabling the location services).'; 20 | } 21 | return message!; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/ActivityTypeMapper.m: -------------------------------------------------------------------------------- 1 | // 2 | // ActivityTypeMapper.m 3 | // geolocator_apple 4 | // 5 | // Created by floris smit on 30/07/2021. 6 | // 7 | 8 | #import 9 | 10 | #import "ActivityTypeMapper.h" 11 | 12 | @implementation ActivityTypeMapper 13 | 14 | + (CLActivityType)toCLActivityType:(NSNumber *)value { 15 | if(!value) { 16 | return CLActivityTypeOther; 17 | } 18 | switch(value.intValue) { 19 | case 0: 20 | return CLActivityTypeAutomotiveNavigation; 21 | case 1: 22 | return CLActivityTypeFitness; 23 | case 2: 24 | return CLActivityTypeOtherNavigation; 25 | case 3: 26 | if (@available(iOS 12.0, macOS 10.14, *)) { 27 | return CLActivityTypeAirborne; 28 | } else { 29 | return CLActivityTypeOther; 30 | } 31 | case 4: 32 | return CLActivityTypeOther; 33 | default: 34 | return CLActivityTypeOther; 35 | } 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/GeolocatorPlugin_Test.h: -------------------------------------------------------------------------------- 1 | // This header is available in the Test module. Import via "@import geolocator_apple.Test;" 2 | 3 | #import 4 | #import 5 | #import 6 | 7 | /// Methods exposed for unit testing. 8 | @interface GeolocatorPlugin(Test) 9 | 10 | /// Overrides the GeolocationHandler instance used by the GeolocatorPlugin. 11 | /// This should only be used for testing purposes. 12 | - (void)setGeolocationHandlerOverride:(GeolocationHandler *)geolocationHandler; 13 | 14 | /// Overrides the LocationAccuracyHandler instance used by the GeolocatorPlugin. 15 | /// This should only be used for testing purposes. 16 | - (void)setLocationAccuracyHandlerOverride:(LocationAccuracyHandler *)locationAccuracyHandler; 17 | 18 | /// Overrides the PermissionHandler instance used by the GeolocatorPlugin. 19 | /// This should only be used for testing purposes. 20 | - (void)setPermissionHandlerOverride:(PermissionHandler *)permissionHandler; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /geolocator_apple/macos/geolocator_apple.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = 'geolocator_apple' 6 | s.version = '1.2.0' 7 | s.summary = 'Geolocation macOS plugin for Flutter.' 8 | s.description = <<-DESC 9 | Geolocation macOS plugin for Flutter. This plugin provides the Apple implementation for the geolocator plugin. 10 | DESC 11 | s.homepage = 'http://github.com/baseflow/flutter-geolocator' 12 | s.license = { :type => 'MIT', :file => '../LICENSE' } 13 | s.author = { 'Baseflow' => 'hello@baseflow.com' } 14 | s.source = { :http => 'https://github.com/baseflow/flutter-geolocator/tree/master/' } 15 | s.source_files = 'Classes/**/*.{h,m}' 16 | s.public_header_files = 'Classes/**/*.h' 17 | s.module_map = 'Classes/GeolocatorPlugin.modulemap' 18 | s.dependency 'FlutterMacOS' 19 | s.platform = :osx, '10.11' 20 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } 21 | end 22 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/permission/LocationPermission.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.permission; 2 | 3 | public enum LocationPermission { 4 | /// Permission to access the device's location is denied by the user. 5 | denied, 6 | /// Permission to access the device's location is denied for ever. The 7 | /// permission dialog will not been shown again until the user updates 8 | /// the permission in the App settings. 9 | deniedForever, 10 | /// Permission to access the device's location is allowed only while 11 | /// the App is in use. 12 | whileInUse, 13 | /// Permission to access the device's location is allowed even when the 14 | /// App is running in the background. 15 | always; 16 | 17 | public int toInt() { 18 | switch (this) { 19 | case denied: 20 | return 0; 21 | case deniedForever: 22 | return 1; 23 | case whileInUse: 24 | return 2; 25 | case always: 26 | return 3; 27 | default: 28 | throw new IndexOutOfBoundsException(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /geolocator/example/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /geolocator/example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /geolocator_windows/example/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /geolocator_android/example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/location/LocationAccuracyManager.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.location; 2 | 3 | import android.Manifest; 4 | import android.content.Context; 5 | import android.content.pm.PackageManager; 6 | 7 | import androidx.core.content.ContextCompat; 8 | 9 | import com.baseflow.geolocator.errors.ErrorCallback; 10 | import com.baseflow.geolocator.errors.ErrorCodes; 11 | 12 | public class LocationAccuracyManager { 13 | 14 | public LocationAccuracyStatus getLocationAccuracy(Context context, ErrorCallback errorCallback) { 15 | if (ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) 16 | == PackageManager.PERMISSION_GRANTED) { 17 | return LocationAccuracyStatus.precise; 18 | } else if (ContextCompat.checkSelfPermission( 19 | context, Manifest.permission.ACCESS_COARSE_LOCATION) 20 | == PackageManager.PERMISSION_GRANTED) { 21 | return LocationAccuracyStatus.reduced; 22 | } else { 23 | errorCallback.onError(ErrorCodes.permissionDenied); 24 | return null; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Baseflow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /geolocator/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Baseflow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /geolocator_web/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Baseflow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /geolocator_android/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Baseflow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /geolocator_apple/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Baseflow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /geolocator_linux/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Baseflow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /geolocator_windows/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Baseflow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /geolocator_platform_interface/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Baseflow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /geolocator_android/test/method_channel_mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | class MethodChannelMock { 5 | final Duration delay; 6 | final MethodChannel methodChannel; 7 | final String method; 8 | final dynamic result; 9 | final log = []; 10 | 11 | MethodChannelMock({ 12 | required String channelName, 13 | required this.method, 14 | this.delay = Duration.zero, 15 | this.result, 16 | }) : methodChannel = MethodChannel(channelName) { 17 | TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger 18 | .setMockMethodCallHandler(methodChannel, _handler); 19 | } 20 | 21 | Future _handler(MethodCall methodCall) async { 22 | log.add(methodCall); 23 | 24 | if (methodCall.method != method) { 25 | throw MissingPluginException('No implementation found for method ' 26 | '$method on channel ${methodChannel.name}'); 27 | } 28 | 29 | return Future.delayed(delay, () { 30 | if (result is Exception) { 31 | throw result; 32 | } 33 | 34 | return Future.value(result); 35 | }); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /geolocator_apple/test/method_channel_mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | class MethodChannelMock { 5 | final Duration delay; 6 | final MethodChannel methodChannel; 7 | final String method; 8 | final dynamic result; 9 | final log = []; 10 | 11 | MethodChannelMock({ 12 | required String channelName, 13 | required this.method, 14 | this.delay = Duration.zero, 15 | this.result, 16 | }) : methodChannel = MethodChannel(channelName) { 17 | TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger 18 | .setMockMethodCallHandler(methodChannel, _handler); 19 | } 20 | 21 | Future _handler(MethodCall methodCall) async { 22 | log.add(methodCall); 23 | 24 | if (methodCall.method != method) { 25 | throw MissingPluginException('No implementation found for method ' 26 | '$method on channel ${methodChannel.name}'); 27 | } 28 | 29 | return Future.delayed(delay, () { 30 | if (result is Exception) { 31 | throw result; 32 | } 33 | 34 | return Future.value(result); 35 | }); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /geolocator_platform_interface/lib/src/enums/location_permission.dart: -------------------------------------------------------------------------------- 1 | /// Represent the possible location permissions. 2 | enum LocationPermission { 3 | /// Permission to access the device's location is denied, the App should try 4 | /// to request permission using the `Geolocator.requestPermission()` method. 5 | denied, 6 | 7 | /// Permission to access the device's location is permenantly denied. When 8 | /// requestiong permissions the permission dialog will not been shown until 9 | /// the user updates the permission in the App settings. 10 | deniedForever, 11 | 12 | /// Permission to access the device's location is allowed only while 13 | /// the App is in use. 14 | whileInUse, 15 | 16 | /// Permission to access the device's location is allowed even when the 17 | /// App is running in the background. 18 | always, 19 | 20 | /// Permission status is cannot be determined. This permission is only 21 | /// returned by the `Geolocator.checkPermission()` method on the web platform 22 | /// for browsers that do not implement the Permission API (see https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API). 23 | unableToDetermine 24 | } 25 | -------------------------------------------------------------------------------- /geolocator_web/lib/src/permissions_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 2 | 3 | /// The interface that implementions need to implement when they want to query 4 | /// geolocation permissions for the web platform. 5 | abstract class PermissionsManager { 6 | /// Returns `true` when permissions requests are supported; otherwise `false` 7 | /// is returned. 8 | /// 9 | /// When permissions are not supported (this means the client browser doesn't 10 | /// support the [Permission API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API)) 11 | /// the [query] method will always return `LocationPermission.denied`. 12 | bool get permissionsSupported; 13 | 14 | /// Queries the current permission for accessing the location information on 15 | /// the current device. 16 | /// 17 | /// When permissions are not supported (this means the client browser doesn't 18 | /// support the [Permission API](https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API)) 19 | /// the [query] method will always return `LocationPermission.denied`. 20 | Future query(Map permission); 21 | } 22 | -------------------------------------------------------------------------------- /geolocator_platform_interface/test/src/implementations/method_channel_mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | class MethodChannelMock { 5 | final Duration delay; 6 | final MethodChannel methodChannel; 7 | final String method; 8 | final dynamic result; 9 | final log = []; 10 | 11 | MethodChannelMock({ 12 | required String channelName, 13 | required this.method, 14 | this.delay = Duration.zero, 15 | this.result, 16 | }) : methodChannel = MethodChannel(channelName) { 17 | TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger 18 | .setMockMethodCallHandler(methodChannel, _handler); 19 | } 20 | 21 | Future _handler(MethodCall methodCall) async { 22 | log.add(methodCall); 23 | 24 | if (methodCall.method != method) { 25 | throw MissingPluginException('No implementation found for method ' 26 | '$method on channel ${methodChannel.name}'); 27 | } 28 | 29 | return Future.delayed(delay, () { 30 | if (result is Exception) { 31 | throw result; 32 | } 33 | 34 | return Future.value(result); 35 | }); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /geolocator_web/lib/src/html_permissions_manager.dart: -------------------------------------------------------------------------------- 1 | import 'dart:html' as html; 2 | 3 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 4 | 5 | import 'permissions_manager.dart'; 6 | import 'utils.dart'; 7 | 8 | /// Implementation of the [GeolocationManager] interface based on the 9 | /// [html.Permissions] class. 10 | class HtmlPermissionsManager implements PermissionsManager { 11 | static const _permissionQuery = {'name': 'geolocation'}; 12 | final html.Permissions? _permissions; 13 | 14 | /// Creates a new instance of the HtmlPermissionsManager class. 15 | HtmlPermissionsManager() : _permissions = html.window.navigator.permissions; 16 | 17 | @override 18 | bool get permissionsSupported => _permissions != null; 19 | 20 | @override 21 | Future query(Map permission) async { 22 | if (!permissionsSupported) { 23 | return LocationPermission.unableToDetermine; 24 | } 25 | 26 | final html.PermissionStatus status = await _permissions!.query( 27 | _permissionQuery, 28 | ); 29 | 30 | return status.state != null 31 | ? toLocationPermission(status.state) 32 | : LocationPermission.denied; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /geolocator/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: geolocator 2 | description: Geolocation plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API for generic location (GPS etc.) functions. 3 | repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator 4 | issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen 5 | version: 9.0.2 6 | 7 | environment: 8 | sdk: ">=2.15.0 <3.0.0" 9 | flutter: ">=2.8.0" 10 | 11 | flutter: 12 | plugin: 13 | platforms: 14 | android: 15 | default_package: geolocator_android 16 | ios: 17 | default_package: geolocator_apple 18 | macos: 19 | default_package: geolocator_apple 20 | web: 21 | default_package: geolocator_web 22 | windows: 23 | default_package: geolocator_windows 24 | 25 | dependencies: 26 | flutter: 27 | sdk: flutter 28 | 29 | geolocator_platform_interface: ^4.0.3 30 | geolocator_android: ^4.1.3 31 | geolocator_apple: ^2.1.1+1 32 | geolocator_web: ^2.1.3 33 | geolocator_windows: ^0.1.0 34 | 35 | dev_dependencies: 36 | flutter_test: 37 | sdk: flutter 38 | flutter_lints: ^1.0.4 39 | mockito: ^5.0.0-nullsafety.7 40 | plugin_platform_interface: ^2.0.0 41 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/location/LocationClient.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.location; 2 | 3 | import android.app.Activity; 4 | 5 | import android.content.Context; 6 | import android.location.LocationManager; 7 | import com.baseflow.geolocator.errors.ErrorCallback; 8 | 9 | public interface LocationClient { 10 | void isLocationServiceEnabled(LocationServiceListener listener); 11 | 12 | void getLastKnownPosition( 13 | PositionChangedCallback positionChangedCallback, ErrorCallback errorCallback); 14 | 15 | boolean onActivityResult(int requestCode, int resultCode); 16 | 17 | void startPositionUpdates( 18 | Activity activity, 19 | PositionChangedCallback positionChangedCallback, 20 | ErrorCallback errorCallback); 21 | 22 | void stopPositionUpdates(); 23 | 24 | default boolean checkLocationService(Context context){ 25 | LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); 26 | boolean gps_enabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); 27 | boolean network_enabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); 28 | return gps_enabled || network_enabled; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Utils/LocationAccuracyMapper.m: -------------------------------------------------------------------------------- 1 | // 2 | // LocationAccuracyParser.m 3 | // geolocator 4 | // 5 | // Created by Maurits van Beusekom on 06/07/2020. 6 | // 7 | 8 | #import "LocationAccuracyMapper.h" 9 | 10 | @implementation LocationAccuracyMapper 11 | 12 | +(CLLocationAccuracy)toCLLocationAccuracy:(NSNumber *)value { 13 | if (!value) return kCLLocationAccuracyBest; 14 | 15 | switch(value.intValue) { 16 | case 0: 17 | return kCLLocationAccuracyThreeKilometers; 18 | case 1: 19 | return kCLLocationAccuracyKilometer; 20 | case 2: 21 | return kCLLocationAccuracyHundredMeters; 22 | case 3: 23 | return kCLLocationAccuracyNearestTenMeters; 24 | case 5: 25 | return kCLLocationAccuracyBestForNavigation; 26 | case 6: 27 | #if TARGET_OS_OSX 28 | return kCLLocationAccuracyThreeKilometers; 29 | #else 30 | if (@available(iOS 14.0, macOS 10.16, *)) { 31 | return kCLLocationAccuracyReduced; 32 | } else { 33 | return kCLLocationAccuracyThreeKilometers; 34 | } 35 | #endif 36 | case 4: 37 | default: 38 | return kCLLocationAccuracyBest; 39 | } 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /geolocator_apple/ios/geolocator_apple.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. 3 | # Run `pod lib lint geolocator.podspec' to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.name = 'geolocator_apple' 7 | s.version = '1.2.0' 8 | s.summary = 'Geolocation iOS plugin for Flutter.' 9 | s.description = <<-DESC 10 | Geolocation iOS plugin for Flutter. This plugin provides the Apple implementation for the geolocator plugin. 11 | DESC 12 | s.homepage = 'http://github.com/baseflow/flutter-geolocator' 13 | s.license = { :type => 'MIT', :file => '../LICENSE' } 14 | s.author = { 'Baseflow' => 'hello@baseflow.com' } 15 | s.source = { :http => 'https://github.com/baseflow/flutter-geolocator/tree/master/' } 16 | s.source_files = 'Classes/**/*.{h,m}' 17 | s.public_header_files = 'Classes/**/*.h' 18 | s.module_map = 'Classes/GeolocatorPlugin.modulemap' 19 | s.dependency 'Flutter' 20 | s.platform = :ios, '8.0' 21 | 22 | # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. 23 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } 24 | end 25 | -------------------------------------------------------------------------------- /geolocator_web/lib/src/geolocation_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 2 | 3 | /// The interface that implementations need to implement to provide geolocation 4 | /// features for the web platform. 5 | abstract class GeolocationManager { 6 | /// Returns the current position. 7 | /// 8 | /// Setting [enableHighAccuracy] to `true` will return the most accurate 9 | /// possible position fix. This can result in slower response times and higher 10 | /// battery consumption. 11 | /// 12 | /// Throws a [TimeoutException] when no position is received within the 13 | /// supplied [timeout] duration. 14 | Future getCurrentPosition({ 15 | bool? enableHighAccuracy, 16 | Duration? timeout, 17 | }); 18 | 19 | /// Returns a position stream providing continuous position updates. 20 | /// 21 | /// Setting [enableHighAccuracy] to `true` will return the most accurate 22 | /// possible location fix. This can result in slower response times and higher 23 | /// battery consumption. 24 | /// 25 | /// Throws a [TimeoutException] when no location is received within the 26 | /// supplied [timeout] duration. 27 | Stream watchPosition({ 28 | bool? enableHighAccuracy, 29 | Duration? timeout, 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /geolocator/example/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | NSLocationUsageDescription 32 | The example App requires access to the device's location. 33 | 34 | 35 | -------------------------------------------------------------------------------- /geolocator_apple/example/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | NSLocationUsageDescription 32 | The example App requires access to the device's location. 33 | 34 | 35 | -------------------------------------------------------------------------------- /geolocator_platform_interface/test/src/errors/position_update_exception_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 3 | 4 | void main() { 5 | test('toString: Should return the default description when message is null', 6 | () { 7 | // Arrange 8 | const expected = 9 | 'Something went wrong while listening for position updates.'; 10 | const exception = PositionUpdateException(null); 11 | 12 | // Act 13 | final actual = exception.toString(); 14 | 15 | // Assert 16 | expect(actual, expected); 17 | }); 18 | 19 | test('toString: Should return the default description when message is empty', 20 | () { 21 | // Arrange 22 | const expected = 23 | 'Something went wrong while listening for position updates.'; 24 | const exception = PositionUpdateException(''); 25 | 26 | // Act 27 | final actual = exception.toString(); 28 | 29 | // Assert 30 | expect(actual, expected); 31 | }); 32 | 33 | test('toString: Should return the message as description', () { 34 | // Arrange 35 | const expected = 'Dummy error message.'; 36 | const exception = PositionUpdateException(expected); 37 | 38 | // Act 39 | final actual = exception.toString(); 40 | 41 | // Assert 42 | expect(actual, expected); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /geolocator_platform_interface/test/src/errors/permission_denied_exception_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:geolocator_platform_interface/geolocator_platform_interface.dart'; 3 | 4 | void main() { 5 | test('toString: Should return the default description when message is null', 6 | () { 7 | // Arrange 8 | const expected = 9 | 'Access to the location of the device is denied by the user.'; 10 | const exception = PermissionDeniedException(null); 11 | 12 | // Act 13 | final actual = exception.toString(); 14 | 15 | // Assert 16 | expect(actual, expected); 17 | }); 18 | 19 | test('toString: Should return the default description when message is empty', 20 | () { 21 | // Arrange 22 | const expected = 23 | 'Access to the location of the device is denied by the user.'; 24 | const exception = PermissionDeniedException(''); 25 | 26 | // Act 27 | final actual = exception.toString(); 28 | 29 | // Assert 30 | expect(actual, expected); 31 | }); 32 | 33 | test('toString: Should return the message as description', () { 34 | // Arrange 35 | const expected = 'Location permission denied.'; 36 | const exception = PermissionDeniedException(expected); 37 | 38 | // Act 39 | final actual = exception.toString(); 40 | 41 | // Assert 42 | expect(actual, expected); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /geolocator_android/android/src/main/java/com/baseflow/geolocator/permission/PermissionUtils.java: -------------------------------------------------------------------------------- 1 | package com.baseflow.geolocator.permission; 2 | 3 | import android.content.Context; 4 | import android.content.pm.PackageInfo; 5 | import android.content.pm.PackageManager; 6 | import android.os.Build; 7 | 8 | public class PermissionUtils { 9 | public static boolean hasPermissionInManifest(Context context, String permission) { 10 | try { 11 | PackageInfo info = getPackageInfo(context); 12 | if (info.requestedPermissions != null) { 13 | for (String p : info.requestedPermissions) { 14 | if (p.equals(permission)) { 15 | return true; 16 | } 17 | } 18 | } 19 | } catch (Exception e) { 20 | e.printStackTrace(); 21 | } 22 | 23 | return false; 24 | } 25 | 26 | @SuppressWarnings("deprecation") 27 | private static PackageInfo getPackageInfo(Context context) throws PackageManager.NameNotFoundException { 28 | final PackageManager packageManager = context.getPackageManager(); 29 | final String packageName = context.getPackageName(); 30 | 31 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) { 32 | return packageManager.getPackageInfo(packageName, PackageManager.GET_PERMISSIONS); 33 | } 34 | 35 | return packageManager.getPackageInfo(packageName, 36 | PackageManager.PackageInfoFlags.of(PackageManager.GET_PERMISSIONS)); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /geolocator_apple/ios/Classes/Handlers/LocationServiceStreamHandler.m: -------------------------------------------------------------------------------- 1 | // 2 | // LocationServiceHandler.m 3 | // geolocator 4 | // 5 | // Created by Floris Smit on 10/06/2021. 6 | // 7 | 8 | #import 9 | #import 10 | #import "LocationServiceStreamHandler.h" 11 | #import "../Utils/ServiceStatus.h" 12 | 13 | @interface LocationServiceStreamHandler() 14 | @property (strong, nonatomic) CLLocationManager *locationManager; 15 | @end 16 | 17 | @implementation LocationServiceStreamHandler { 18 | FlutterEventSink _eventSink; 19 | } 20 | 21 | - (FlutterError * _Nullable)onCancelWithArguments:(id _Nullable)arguments { 22 | self.locationManager = nil; 23 | _eventSink = nil; 24 | return nil; 25 | } 26 | 27 | - (FlutterError * _Nullable)onListenWithArguments:(id _Nullable)arguments eventSink:(nonnull FlutterEventSink)events { 28 | _eventSink = events; 29 | if (self.locationManager == nil) { 30 | self.locationManager = [[CLLocationManager alloc] init]; 31 | self.locationManager.delegate = self; 32 | } 33 | return nil; 34 | } 35 | 36 | - (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status{ 37 | if ([CLLocationManager locationServicesEnabled]) { 38 | _eventSink([NSNumber numberWithInt:(ServiceStatus)enabled]); 39 | } else { 40 | _eventSink([NSNumber numberWithInt:(ServiceStatus)disabled]); 41 | } 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /geolocator/example/windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"example", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | --------------------------------------------------------------------------------