37 lines
992 B
Objective-C
37 lines
992 B
Objective-C
//
|
|
// AMapFlutterFactory.m
|
|
// amap_map
|
|
//
|
|
// Created by lly on 2020/10/29.
|
|
//
|
|
|
|
#import "AMapFlutterFactory.h"
|
|
#import <MAMapKit/MAMapKit.h>
|
|
#import "AMapViewController.h"
|
|
|
|
@implementation AMapFlutterFactory {
|
|
NSObject<FlutterPluginRegistrar>* _registrar;
|
|
}
|
|
|
|
- (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
|
|
self = [super init];
|
|
if (self) {
|
|
_registrar = registrar;
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (NSObject<FlutterMessageCodec>*)createArgsCodec {
|
|
return [FlutterStandardMessageCodec sharedInstance];
|
|
}
|
|
|
|
- (NSObject<FlutterPlatformView>*)createWithFrame:(CGRect)frame
|
|
viewIdentifier:(int64_t)viewId
|
|
arguments:(id _Nullable)args {
|
|
return [[AMapViewController alloc] initWithFrame:frame
|
|
viewIdentifier:viewId
|
|
arguments:args
|
|
registrar:_registrar];
|
|
}
|
|
@end
|