getLocation method

Future<AGMLViewPoint?> getLocation()

Implementation

Future<AGMLViewPoint?> getLocation() async {
  const method = '/getLocation';
  try {
    final response = await _channel.invokeMethod(method) as String;
    final location = AGMLViewPoint.fromJson(jsonDecode(response));
    return location;
  } on PlatformException catch (e) {
    if(kDebugMode) print(e);
    return null;
  }
}