Masamune Location
[GitHub](https://github.com/mathrunet) | [YouTube](https://www.youtube.com/c/mathrunetchannel) | [Packages](https://pub.dev/publishers/mathru.net/packages) | [X](https://x.com/mathru) | [LinkedIn](https://www.linkedin.com/in/mathrunet/) | [mathru.net](https://mathru.net)
Masamune Location Platform Interface
Overview
masamune_location_platform_interface defines the abstract interfaces for location-related adapters in the Masamune framework. This package is primarily used by package authors implementing custom location adapters.
Note: Most developers should use masamune_location instead of this package directly.
Usage
This package is automatically included as a dependency when you use:
masamune_locationmasamune_location_backgroundmasamune_location_geocodingmasamune_location_google
For Package Authors
If you're creating a custom location adapter, extend LocationMasamuneAdapter:
import 'package:masamune_location_platform_interface/masamune_location_platform_interface.dart';
class MyCustomLocationAdapter extends LocationMasamuneAdapter {
@override
Future<Position> getCurrentPosition() async {
// Implement custom location retrieval
}
@override
Future<void> startListening({
double? distanceFilter,
Duration? timeInterval,
}) async {
// Implement continuous updates
}
// ... other methods
}
Provided Interfaces
LocationMasamuneAdapter- Abstract base class for location adaptersPosition- Location data structureLocationAccuracy- Accuracy level enumPermissionStatus- Permission state enum
For End Users
Use concrete implementations like:
MobileLocationMasamuneAdapter(frommasamune_location)GoogleMobileLocationMasamuneAdapter(frommasamune_location_google)BackgroundLocationMasamuneAdapter(frommasamune_location_background)
See the respective package documentation for usage examples.
GitHub Sponsors
Sponsors are always welcome. Thank you for your support!
Libraries
- masamune_location_platform_interface
- Masamune plugin library for handling location information in apps.