masamune_location_platform_interface 3.1.1
masamune_location_platform_interface: ^3.1.1 copied to clipboard
Masamune plugin library for handling location information in apps.
Masamune Location
[GitHub] | [YouTube] | [Packages] | [X] | [LinkedIn] | [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!