amap_core_fluttify/ios/Classes/AmapCoreFluttifyPlugin.m

59 lines
2.0 KiB
Mathematica
Raw Normal View History

2024-11-17 15:40:22 +08:00
//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////
#import "AmapCoreFluttifyPlugin.h"
#import <objc/runtime.h>
#import "SubHandler/SubHandler0.h"
#import "SubHandler/Custom/SubHandlerCustom.h"
#import "FluttifyMessageCodec.h"
#import <AMapFoundationKit/AMapFoundationKit.h>
// Dart, MethodChannel,
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
// Dart
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
//
extern BOOL enableLog;
@implementation AmapCoreFluttifyPlugin {
NSMutableDictionary<NSString*, Handler>* _handlerMap;
}
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar {
self = [super init];
if (self) {
_registrar = registrar;
//
_handlerMap = @{}.mutableCopy;
[_handlerMap addEntriesFromDictionary: [self getSubHandler0]];
[_handlerMap addEntriesFromDictionary: [self getSubHandlerCustom]];
}
return self;
}
+ (void)registerWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar {
FlutterMethodChannel *channel = [FlutterMethodChannel
methodChannelWithName:@"me.yohom/amap_core_fluttify"
binaryMessenger:[registrar messenger]
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
[registrar addMethodCallDelegate:[[AmapCoreFluttifyPlugin alloc] initWithFlutterPluginRegistrar:registrar]
channel:channel];
// View
}
// Method Handlers
- (void)handleMethodCall:(FlutterMethodCall *)methodCall result:(FlutterResult)methodResult {
if (_handlerMap[methodCall.method] != nil) {
_handlerMap[methodCall.method](_registrar, [methodCall arguments], methodResult);
} else {
methodResult(FlutterMethodNotImplemented);
}
}
@end