AMapCoordinateConvert function

Future<CLLocationCoordinate2D> AMapCoordinateConvert(
  1. CLLocationCoordinate2D coordinate,
  2. AMapCoordinateType type
)

Implementation

Future<CLLocationCoordinate2D> AMapCoordinateConvert(CLLocationCoordinate2D coordinate, AMapCoordinateType type) async {
  // print log
  if (fluttifyLogEnabled) {
    debugPrint('fluttify-dart: AMapCoordinateConvert::AMapCoordinateConvert([])');
  }

  // invoke native method
  final __result__ = await MethodChannel('me.yohom/amap_core_fluttify', StandardMethodCodec(FluttifyMessageCodec('amap_core_fluttify'))).invokeMethod('AMapCoordinateConvert::AMapCoordinateConvert', {"coordinate": coordinate, "type": type.toValue()});


  // handle native call


  // convert native result to dart side object
  if (__result__ == null) {
    return null;
  } else {
    return CLLocationCoordinate2D()..refId = __result__..tag__ = 'amap_core_fluttify';
  }
}