registerLocationUpdate static method
Future<void>
registerLocationUpdate(
- void callback(), {
- void initCallback()?,
- Map<
String, dynamic> initDataCallback = const {}, - void disposeCallback()?,
- bool autoStop = false,
- AndroidSettings androidSettings = const AndroidSettings(),
- IOSSettings iosSettings = const IOSSettings(),
Implementation
static Future<void> registerLocationUpdate(
void Function(LocationDto) callback,
{void Function(Map<String, dynamic>)? initCallback,
Map<String, dynamic> initDataCallback = const {},
void Function()? disposeCallback,
bool autoStop = false,
AndroidSettings androidSettings = const AndroidSettings(),
IOSSettings iosSettings = const IOSSettings()}) async {
if (autoStop) {
WidgetsBinding.instance.addObserver(AutoStopHandler());
}
final args = SettingsUtil.getArgumentsMap(
callback: callback,
initCallback: initCallback,
initDataCallback: initDataCallback,
disposeCallback: disposeCallback,
androidSettings: androidSettings,
iosSettings: iosSettings);
await _channel.invokeMethod(
Keys.METHOD_PLUGIN_REGISTER_LOCATION_UPDATE, args);
}