getLocation method

  1. @override
Future<Map<String, double>?> getLocation()
override

Fetches the current location (latitude and longitude). Returns a map with keys 'latitude' and 'longitude', or null if not available/denied.

Implementation

@override
Future<Map<String, double>?> getLocation() async {
  final result = await methodChannel.invokeMapMethod<String, double>('getLocation');
  return result;
}