anonymous__ static method
Implementation
static Future<com_amap_api_location_AMapLocationListener> anonymous__() async {
final __result__ = await kAmapLocationFluttifyChannel.invokeMethod('com.amap.api.location.AMapLocationListener::createAnonymous__');
final __object__ = AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocationListener>(__result__)!;
// handle callback
MethodChannel('com.amap.api.location.AMapLocationListener::Callback@${__object__.refId}', kAmapLocationFluttifyMethodCodec)
.setMethodCallHandler((methodCall) async {
try {
final args = methodCall.arguments as Map;
switch (methodCall.method) {
case 'onLocationChanged':
// print log
if (fluttifyLogEnabled) {
debugPrint('fluttify-dart-callback: __object__.onLocationChanged?.call([\'var1\':${args['var1']}])');
}
// handle the native call
__object__.onLocationChanged?.call(AmapLocationFluttifyAndroidAs<com_amap_api_location_AMapLocation>(args['var1']));
break;
default:
throw MissingPluginException('方法${methodCall.method}未实现');
break;
}
} catch (e) {
debugPrint(e.toString());
rethrow;
}
});
return __object__;
}