triggerLocationTracker function
dynamic
triggerLocationTracker(
- String methodChannel, {
- required dynamic startAfterTimestamp,
- required dynamic locationUpdateInterval,
- required dynamic stopAfterTimestamp,
Implementation
triggerLocationTracker(String methodChannel,
{required var startAfterTimestamp,
required var locationUpdateInterval,
required var stopAfterTimestamp}) async {
var platform = MethodChannel(methodChannel);
try {
await platform.invokeMethod('startLocationUpdates', {
"startAfterTimestamp": startAfterTimestamp,
"interval": locationUpdateInterval,
"stopAfterTimestamp": stopAfterTimestamp,
});
} on PlatformException catch (e) {
if (kDebugMode) {
print("Error: $e");
}
}
}