Lyokone/flutterlocation
60.0
Adequate · 19 September 2026
3.9k
lines of production code
Dart
with Kotlin, C++, Swift
1
measurement over time
What this system is
This system is a cross-platform Flutter plugin that provides location services across Android, iOS, macOS, Web, Linux, and Windows. It enables applications to request permissions, retrieve current and cached locations, and stream real-time updates with high reliability. The plugin supports advanced background location tracking with customizable Android notifications and handles platform-specific nuances like mock data detection and permission states.
How it got here
2017 — Monorepo restructuring and API modernization
8 changes.
The project was reorganized into a multi-package monorepo using Melos, splitting the codebase into core, platform interface, and web packages. Legacy implementations and APIs were removed across Android, iOS, and the example app, while the Android plugin was rewritten in Kotlin to support customizable background notifications and modern embedding standards.
2021 — Platform interface v7 and example modernization
15 changes.
The project introduced breaking nullability changes and new background location capabilities in the platform interface v7, including cached location retrieval and notification customization. The example application was comprehensively rewritten and expanded to support macOS and PWA features, while web and Android implementations were updated to align with these new standards and improve error handling.
2026 — Desktop platform expansion and Android modernization
5 changes.
The project expanded its platform support by adding native location implementations for Linux and Windows, alongside Swift Package Manager support for Darwin. Concurrently, the Android plugin was rewritten in Kotlin to improve reliability, fix concurrency issues, and enhance compatibility with modern Android versions and devices lacking Google Play Services.
Features
Add Linux location support via GeoClue2
This change introduces the Linux platform implementation for the location plugin, enabling Flutter apps to access device location on Linux desktops. The implementation registers a native plugin that communicates with the GeoClue2 service over D-Bus to retrieve location data (latitude, longitude, accuracy, altitude, speed, and heading) and supports both one-time location requests and continuous streaming.
packages/location/linux · high confidence
Add Windows location plugin implementation
This change introduces the Windows implementation for the location plugin, enabling location access on Windows desktop applications. It includes the C++ source code using WinRT APIs to retrieve and stream location data, the CMake build configuration requiring C++20 for coroutines, and the necessary header files for plugin registration.
packages/location/windows · high confidence
Added macOS example app support
The location example now includes a native macOS application, allowing developers to run and test the plugin on macOS. This addition provides the complete Xcode project structure, including the Runner target, Swift application entry points (AppDelegate and MainFlutterWindow), and necessary configuration files (Info.plist, entitlements, and xcconfigs). It also sets up CocoaPods integration for macOS dependencies and configures the required location usage descriptions in the app manifest.
packages/location/example/macos · high confidence
Android implementation migrated to Kotlin with enhanced location reliability
The Android plugin code has been rewritten from Java to Kotlin, introducing several reliability improvements for users. Concurrent location requests are now handled correctly, ensuring all pending calls resolve rather than only the last one. The plugin now gracefully falls back to the Android framework LocationManager on devices lacking Google Play Services, preventing crashes on certain ROMs. Satellite counts are accurately reported by parsing NMEA data instead of relying on a deprecated extras key. Additionally, the plugin now supports approximate location reporting on Android 31+, exposes whether background (Always) permission is granted, and allows configuring a specific update interval for background mode.
packages/location/android/src/main/kotlin · high confidence
Enhanced background location control and notification customization on Android
The location plugin now offers finer control over background location services and Android notifications. Users can customize the sticky background notification's title, subtitle, description, color, and icon (via resource name or raw bytes), and choose whether tapping the notification brings the app to the foreground. Background mode initialization now includes an optional \requireBackgroundPermission\ flag to start a foreground service without requesting the 'Allow all the time' permission. Additionally, \changeSettings\ supports a separate \backgroundInterval\ for Android, and a new \getLastKnownLocation\ method provides immediate access to cached location data.
packages/location/lib · high confidence
Expanded location platform interface with background and caching capabilities
The \location\_platform\_interface\ package has been updated to expose new methods for managing background location and accessing cached data. Users can now check if background location permission is granted via \isBackgroundPermissionGranted\ and control whether enabling background mode requires the specific background permission through the \requireBackgroundPermission\ argument in \enableBackgroundMode\. Additionally, \getLastKnownLocation\ allows retrieving the most recently cached location without waiting for a fresh fix, and \changeSettings\ now supports a \backgroundInterval\ for Android to define update frequency while in the background. The interface also introduces \changeNotificationOptions\ to customize the Android background notification's title, subtitle, color, icon, and behavior.
_packages/location\_platform\interface/lib · high confidence
Introduces Swift Package Manager support for iOS and macOS
The location plugin now supports installation via Swift Package Manager on iOS and macOS. This change adds the necessary Swift source files (LocationPlugin.swift) and a privacy manifest (PrivacyInfo.xcprivacy) to the darwin package, along with a .gitignore to exclude SPM build artifacts. This allows developers to integrate the plugin using SPM in addition to existing CocoaPods or manual integration methods.
packages/location/darwin · high confidence
Native desktop runners added for Linux and Windows
The location example app now includes native build configurations for Linux (GTK) and Windows (Win32), enabling it to be built and run as a desktop application on these platforms. This adds the necessary CMake build files, platform-specific entry points, and window management code to support desktop deployment alongside existing mobile targets.
packages/location/example/linux, packages/location/example/windows · high confidence
Web demo now supports Progressive Web App (PWA) features
The web demo application now includes the necessary configuration files to function as a Progressive Web App. An index.html entry point has been added to register a service worker, enabling offline capabilities and background synchronization, while a manifest.json file defines the app's metadata, icons, and display preferences for installation on mobile and desktop browsers.
packages/location/example/web · high confidence
Removals
Removal of legacy Flutter example project files
The example directory has been cleaned up by deleting obsolete IDE and build artifacts, specifically the \.gitignore\, \README.md\, and several \.iml\ module files (\android.iml\, \location\_example.iml\, \location\_example\_android.iml\). This change removes legacy configuration files that are no longer required for the Flutter example project.
example · high confidence
Removal of legacy Location class implementation
The legacy \Location\ class, which previously exposed \getLocation\ and \onLocationChanged\ via the \lyokone/location\ MethodChannel, has been removed from the library. This deletion marks the end of support for the original API surface, requiring users to migrate to the updated service management and settings-based approach introduced in the same change set.
lib · high confidence
Removal of legacy example application
The previous example application located in example/lib/main.dart has been removed. This file contained the original Flutter demo code for the location plugin, including the main app entry point, state management for location updates, and basic UI scaffolding. Its deletion indicates that the example app structure has been reorganized or replaced by a different implementation in other parts of the repository.
example/lib · high confidence
iOS location plugin implementation removed
The iOS-specific implementation files for the location plugin (including the Objective-C header, Objective-C implementation, and the Swift plugin class) have been deleted from the repository. This change removes the native iOS code that previously handled location services, permission requests, and event streaming via the Flutter plugin registrar.
ios · high confidence
Architecture
Repository restructured into a multi-package monorepo with Melos and new documentation site
The project has been reorganized into a monorepo managed by Melos, introducing separate packages for the core plugin, platform interface, and web implementation. This structural change is accompanied by the addition of a new documentation site configuration (docs.json) and a comprehensive landing-page README that highlights support for Android, iOS, macOS, Web, Windows, and Linux, along with features like background tracking and real-time streams. Legacy IDE module files (.iml) and the old changelog have been removed, and the license has been standardized to MIT.
(repo-wide) · high confidence
Behavioural changes
Android example app updated to Flutter v2 embedding and Android 12 compatibility
The Android example app has been updated to use the Flutter v2 embedding (FlutterActivity) and includes the necessary AndroidManifest permissions (INTERNET, FOREGROUND\_SERVICE, ACCESS\_BACKGROUND\_LOCATION) and resource files to support modern Android development practices, including Android 12 compatibility and null safety.
packages/location/example/android/app · high confidence
Android plugin rewritten in Kotlin with customizable background notifications
The Android implementation has been migrated from Java to Kotlin, modernizing the codebase and removing legacy files like the old AndroidManifest and Java plugin class. A key user-facing change is the introduction of a customizable background notification system; users can now configure the notification's title, subtitle, description, and color, and support large icons via both resource names and raw byte arrays (allowing dynamic icons like Flutter IconData). The service also handles foreground service permissions and notification channels more robustly on modern Android versions.
android · high confidence
Example app configuration and scaffolding updates
The example application has been updated with new configuration files to support modern development workflows. A .gitignore file has been added to exclude standard Flutter build artifacts and IDE-specific files, while a .metadata file tracks the Flutter stable channel revision for migration purposes. The README has been refreshed with standard Flutter getting-started resources, and the analysis options now include the leancode\_lint package to enforce consistent code style.
packages/location/example · high confidence
Expanded LocationData model and new location management methods
The platform interface now exposes richer location metadata, including \isMock\ (to detect simulated locations) and \isProducedByAccessory\ (to identify external GPS hardware), along with Android-specific details like \headingAccuracy\, \elapsedRealtimeNanos\, \satelliteNumber\, and \provider\. The \LocationData\ class also adds \toJson\, \fromJson\, and \copyWith\ methods for easier serialization and manipulation. Additionally, the interface introduces \getLastKnownLocation\ to retrieve cached fixes and \isBackgroundPermissionGranted\ to check if background location access is explicitly allowed, while \changeSettings\ now supports a \backgroundInterval\ parameter for Android.
_packages/location\_platform\interface/lib/src · high confidence
Removal of Android V1 embedding files
The Android example app has removed the legacy V1 embedding configuration, specifically deleting the AndroidManifest.xml, MainActivity.java, and .gitignore files that previously handled the old Flutter activity lifecycle and plugin registration. This change eliminates the manual setup required for the older embedding version, aligning the example with the newer Android embedding standards.
example/android · high confidence
Rewritten location example app with new background and notification controls
The example application in packages/location/example/lib has been completely rewritten to demonstrate the latest API capabilities. It now includes dedicated widgets for checking and requesting permissions and service status, retrieving both current and last known locations, and listening to location streams. New features allow users to toggle background mode, configure change settings (including accuracy, intervals, and the iOS pausesLocationUpdatesAutomatically flag), and customize Android notification options such as channel name, title, and icon. The app also fixes a deprecated DropdownButtonFormField usage by switching to initialValue.
packages/location/example/lib · high confidence
Web geolocation errors now map to PlatformException and permission checks are corrected
The web plugin implementation now converts browser Geolocation API errors into standard PlatformExceptions, ensuring that web-based location errors are catchable in the same way as Android and iOS errors. Additionally, permission status queries now use a proper PermissionDescriptor object to avoid browser rejections, and the permission request flow has been adjusted to prevent misreporting unrelated location failures as permission denials.
_packages/location\web/lib · high confidence
Web location API fixes and null-safety alignment
The web implementation now correctly handles permission checks by passing a proper JavaScript object literal to the Permissions API, preventing crashes when \hasPermission()\ is called. Browser geolocation errors are now mapped to standard \PlatformException\ codes (such as \PERMISSION\_DENIED\ or \TIMEOUT\), making error handling consistent with Android and iOS. Additionally, \hasPermission()\ no longer crashes in environments where the Permissions API is unavailable, and \requestPermission()\ no longer incorrectly reports \deniedForever\ for non-permission failures like GPS timeouts. The package also aligns with the platform interface's null-safety updates, ensuring latitude and longitude are treated as non-nullable.
_packages/location\web · high confidence
iOS example app migrated to modern Xcode and Flutter tooling standards
The iOS example app has been updated to build with modern Xcode and Flutter configurations. This includes migrating the project to Xcode 15 (objectVersion 54), adopting the UIScene lifecycle via new Info.plist entries, and updating the AppDelegate to use the implicit engine delegate pattern. The build system now relies on CocoaPods for dependency management, and the app bundle now correctly references Flutter build variables for versioning.
packages/location/example/ios · high confidence
location\_platform\_interface 7.0.0 introduces breaking nullability changes and new platform capabilities
The platform interface has been updated to version 7.0.0, introducing a breaking change where \LocationData.latitude\ and \LocationData.longitude\ are now non-nullable \double\ values; if underlying data omits these coordinates, \fromMap\/\fromJson\ will now throw an error instead of silently producing null values. This release also adds several new capabilities: \LocationData\ now includes serialization methods (\toJson\, \fromJson\, \copyWith\) and boolean flags \isMock\ and \isProducedByAccessory\ to indicate simulated or accessory-generated location data on Apple platforms. The \LocationPlatform\ interface expands with \isBackgroundPermissionGranted()\ to check for 'Always' access, \getLastKnownLocation()\ to retrieve cached coordinates immediately, and new parameters for background mode (\backgroundInterval\, \requireBackgroundPermission\) and notification customization (\imageName\, \iconBytes\, \imageBytes\).
_packages/location\_platform\interface · high confidence
Test coverage
Added unit tests for the location package; Added unit tests for the location platform interface.
Dependencies
Migrate to monorepo structure with Melos and update build toolchains
The project has been restructured into a monorepo managed by Melos, splitting the code into \location\, \location\_platform\_interface\, and \location\_web\ packages. This update upgrades the Android build environment to Gradle 8.11.1, Kotlin 2.2.20, and targets Android SDK 36, while also adding Swift Package Manager support for iOS and macOS. The example app has been modernized to require Flutter 3.27.0 and Dart 3.6.0, and the root workspace now uses \leancode\_lint\ for consistent code quality across all packages.
(dependencies) · high confidence
Update Gradle wrapper to version 8.14.3
The Android example app's build environment has been updated to use Gradle 8.14.3, ensuring compatibility with modern Android build tools and improving build performance and stability for developers running the example application.
packages/location/example/android/gradle · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 60.
Lenses
- Code Health 97
- Architecture 100
- Maturity 49
- Readiness 55
- Security 67
- Domain Modelling 100
Changes since last survey
- 300 commits — 211 feature/other, 89 fixes
By area
- packages/location — 119 commits
- (repo) — 99 commits
- packages/location_web — 23 commits
- packages/location_platform_interface — 19 commits
- .github/workflows — 13 commits
- (root) — 9 commits
- docs/features — 8 commits
- .github/scripts — 3 commits
- docs/testing.mdx — 3 commits
- docs/installation — 2 commits
- docs/assets — 1 commit
- docs/getting-started.mdx — 1 commit
Notable commits
- fix: * fix #620 bug and #864 bug
- fix: Configure pausesLocationUpdatesAutomatically in iOS (Fixes Issue#951, Supersedes PR#992) (#933)
- fix: Merge pull request #1050 from Lyokone/fix/darwin-location-services-off-main-thread
- fix: Merge pull request #1052 from Lyokone/fix/darwin-getlocation-stale-guard-hang
- fix: Merge pull request #1053 from Lyokone/docs/fix-phantom-api
- fix: Merge pull request #1054 from Lyokone/fix/pubdev-readme-link
- fix: Merge pull request #1057 from Lyokone/fix/android-granted-limited
- fix: Merge pull request #1065 from Lyokone/fix/web-permission-descriptor
- fix: Merge pull request #1067 from Lyokone/fix/web-geolocation-errors
- fix: Merge pull request #1068 from Lyokone/fix/android-permission-first-denial
- fix: Merge pull request #1069 from Lyokone/fix/ios-getlocation-permission-denied-hang
- fix: Merge pull request #1070 from Lyokone/fix/ios-speed-invalid-sentinel
- fix: Merge pull request #1071 from Lyokone/fix/android-satellite-count
- fix: Merge pull request #1073 from Lyokone/fix/ios-modern-always-permission-key
- fix: Merge pull request #1074 from Lyokone/fix/android-stream-error-on-service-disabled
- fix: Merge pull request #1076 from Lyokone/fix/android-settings-resolution-wrong-result-field
- fix: Merge pull request #1077 from Lyokone/fix/ios-changesettings-interval
- fix: Merge pull request #1078 from Lyokone/fix/concurrent-getlocation-calls
- fix: Merge pull request #1079 from Lyokone/fix/master-build-broken-getlocationresults
- fix: Merge pull request #1080 from Lyokone/fix/android-startforeground-crash
- …and 280 more
Architecture
- 0 containers · 1 bounded contexts · 0 dependency edges (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
Lyokone/flutterlocation was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 31a8aa08095dda0437ef038fbcbbab5cb6035493 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.