getCurrentPosition static method

Future<Position?> getCurrentPosition({
  1. bool forceLocationManager = false,
})

Wraps the SimpleBgLocationPlatform.getCurrentPosition

Get a single current location fix on the device.

Unlike getLastKnownPosition that returns a cached location, this method could cause active location computation on the device. If the device location can be determined within reasonable time(tens of seconds), otherwise null will be return

Implementation

static Future<Position?> getCurrentPosition(
    {bool forceLocationManager = false}) {
  return SimpleBgLocationPlatform.instance
      .getCurrentPosition(forceLocationManager: forceLocationManager);
}