amap_core_fluttify
This commit is contained in:
15
ios/Classes/AmapCoreFluttifyPlugin.h
Normal file
15
ios/Classes/AmapCoreFluttifyPlugin.h
Normal file
@ -0,0 +1,15 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Flutter/Flutter.h>
|
||||
|
||||
typedef void (^Handler)(NSObject <FlutterPluginRegistrar> *, id, FlutterResult);
|
||||
|
||||
@interface AmapCoreFluttifyPlugin : NSObject<FlutterPlugin>
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
59
ios/Classes/AmapCoreFluttifyPlugin.m
Normal file
59
ios/Classes/AmapCoreFluttifyPlugin.m
Normal file
@ -0,0 +1,59 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// 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
|
13
ios/Classes/SubHandler/Custom/SubHandlerCustom.h
Normal file
13
ios/Classes/SubHandler/Custom/SubHandlerCustom.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapCoreFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapCoreFluttifyPlugin (SubHandlerCustom)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandlerCustom;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
23
ios/Classes/SubHandler/Custom/SubHandlerCustom.m
Normal file
23
ios/Classes/SubHandler/Custom/SubHandlerCustom.m
Normal file
@ -0,0 +1,23 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "SubHandlerCustom.h"
|
||||
#import "FluttifyMessageCodec.h"
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation AmapCoreFluttifyPlugin (SubHandlerCustom)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandlerCustom {
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
return @{
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
13
ios/Classes/SubHandler/SubHandler0.h
Normal file
13
ios/Classes/SubHandler/SubHandler0.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapCoreFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapCoreFluttifyPlugin (SubHandler0)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler0;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
2441
ios/Classes/SubHandler/SubHandler0.m
Normal file
2441
ios/Classes/SubHandler/SubHandler0.m
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user