getLocationInfo method
Implementation
@override
Future<Map<String, dynamic>> getLocationInfo() async {
Map<String, dynamic> result = <String, dynamic>{};
try {
final locationInfo = await methodChannel
.invokeMethod<Map<dynamic, dynamic>>('getLocationInfo');
return jsonDecode(_jsonEncoder.convert(locationInfo));
} on PlatformException catch (error) {
return result
..addEntries(
[MapEntry("code", error.code), MapEntry("message", error.message)]);
}
}