setOdometer static method
Initialize the odometer
to any arbitrary value.
NOTE: setOdometer
will internally perform a getCurrentPosition in order to record to exact location where odometer was set.
Example
BackgroundGeolocation.setOdometer(1234.56).then((Location location) {
// This is the location where odometer was set at.
print('[setOdometer] success: ${location}');
});
Implementation
static Future<Location> setOdometer(double value) async {
Map data = (await _methodChannel.invokeMapMethod('setOdometer', value))!;
return Location(data);
}