anonymous__ static method
Implementation
static Future<BMKGeneralDelegate> anonymous__() async {
final __result__ = await kBmapCoreFluttifyChannel.invokeMethod('BMKGeneralDelegate::createAnonymous__');
final __object__ = BmapCoreFluttifyIOSAs<BMKGeneralDelegate>(__result__)!;
// handle callback
MethodChannel('BMKGeneralDelegate::Callback@${__object__.refId}', kBmapCoreFluttifyMethodCodec)
.setMethodCallHandler((methodCall) async {
try {
final args = methodCall.arguments as Map;
switch (methodCall.method) {
case 'onGetNetworkState':
// print log
if (fluttifyLogEnabled) {
debugPrint('fluttify-dart-callback: __object__.onGetNetworkState?.call([\'iError\':${args['iError']}])');
}
// handle the native call
__object__.onGetNetworkState?.call(args['iError']);
break;
case 'onGetPermissionState':
// print log
if (fluttifyLogEnabled) {
debugPrint('fluttify-dart-callback: __object__.onGetPermissionState?.call([\'iError\':${args['iError']}])');
}
// handle the native call
__object__.onGetPermissionState?.call(args['iError']);
break;
default:
throw MissingPluginException('方法${methodCall.method}未实现');
break;
}
} catch (e) {
debugPrint(e.toString());
rethrow;
}
});
return __object__;
}