The Flutter geolocator plugin adds geolocation APIs to Flutter apps through a federated multi-package layout. Platform-specific implementations cover mobile, desktop, and web targets.
Overview
The Flutter geolocator plugin is organized as a federated Flutter plugin following the platform-interface pattern. App developers depend on the main geolocator package while endorsed implementations supply behavior on each supported operating environment.
The geolocator package is the app-facing entry users add to a Flutter project. Separate packages provide the Android, Apple (iOS and macOS), web, and Windows implementations, each adhering to a shared platform interface. Another package defines that interface for authors who need custom platform bindings.
This split lets Flutter apps access device location through one Dart API while native code handles permissions and sensors per platform.
Key features
- Federated Flutter plugin architecture
- Shared geolocator platform interface
- Endorsed Android implementation package
- Endorsed Apple iOS and macOS package
- Endorsed web and Windows packages
- Single app-facing geolocator dependency
Use cases
- Adding GPS location to Flutter mobile apps
- Sharing one geolocation API across Flutter platforms
- Implementing custom geolocator platform bindings
- Flutter apps that need macOS or Windows location access
- Web Flutter apps requiring browser geolocation