getCurrentLocation method

  1. @override
Future getCurrentLocation()
override

Implementation

@override
Future<dynamic> getCurrentLocation() async {
  try {
    // await checkLocationPermission();
    var ds = await methodChannel.invokeMethod('getCurrentLocation');
    return ds;
  } on PlatformException catch (e) {
    throw Exception("Failed to get current location: '${e.message}'.");
  }
}