amap_location_fluttify
This commit is contained in:
15
ios/Classes/AmapLocationFluttifyPlugin.h
Normal file
15
ios/Classes/AmapLocationFluttifyPlugin.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 AmapLocationFluttifyPlugin : NSObject<FlutterPlugin>
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
61
ios/Classes/AmapLocationFluttifyPlugin.m
Normal file
61
ios/Classes/AmapLocationFluttifyPlugin.m
Normal file
@ -0,0 +1,61 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapLocationFluttifyPlugin.h"
|
||||
#import <objc/runtime.h>
|
||||
#import "SubHandler/SubHandler0.h"
|
||||
#import "SubHandler/SubHandler1.h"
|
||||
#import "SubHandler/Custom/SubHandlerCustom.h"
|
||||
#import "FluttifyMessageCodec.h"
|
||||
#import <AMapLocationKit/AMapLocationKit.h>
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation AmapLocationFluttifyPlugin {
|
||||
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 getSubHandler1]];
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandlerCustom]];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (void)registerWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar {
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:@"me.yohom/amap_location_fluttify"
|
||||
binaryMessenger:[registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
|
||||
[registrar addMethodCallDelegate:[[AmapLocationFluttifyPlugin 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
|
@ -0,0 +1,21 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AMapLocationKit/AMapLocationKit.h>
|
||||
|
||||
@protocol FlutterPluginRegistrar;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AMapGeoFenceManagerDelegate_Anonymous : NSObject<AMapGeoFenceManagerDelegate>
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
106
ios/Classes/Anonymous/AMapGeoFenceManagerDelegate_Anonymous.m
Normal file
106
ios/Classes/Anonymous/AMapGeoFenceManagerDelegate_Anonymous.m
Normal file
@ -0,0 +1,106 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AMapGeoFenceManagerDelegate_Anonymous.h"
|
||||
#import <Flutter/Flutter.h>
|
||||
#import "FluttifyMessageCodec.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation AMapGeoFenceManagerDelegate_Anonymous
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_registrar = registrar;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)amapGeoFenceManager : (AMapGeoFenceManager*)manager doRequireLocationAuth: (CLLocationManager*)locationManager
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapGeoFenceManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapGeoFenceManagerDelegate::amapGeoFenceManager_doRequireLocationAuth");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapGeoFenceManager* argmanager = manager;
|
||||
// ref callback arg
|
||||
CLLocationManager* arglocationManager = locationManager;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapGeoFenceManager_doRequireLocationAuth" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"locationManager": arglocationManager == nil ? [NSNull null] : arglocationManager}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
- (void)amapGeoFenceManager : (AMapGeoFenceManager*)manager didAddRegionForMonitoringFinished: (NSArray<AMapGeoFenceRegion*>*)regions customID: (NSString*)customID error: (NSError*)error
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapGeoFenceManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapGeoFenceManagerDelegate::amapGeoFenceManager_didAddRegionForMonitoringFinished_customID_error");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapGeoFenceManager* argmanager = manager;
|
||||
// ref callback arg
|
||||
NSArray<AMapGeoFenceRegion*>* argregions = regions;
|
||||
// ref callback arg
|
||||
NSString* argcustomID = customID;
|
||||
// ref callback arg
|
||||
NSError* argerror = error;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapGeoFenceManager_didAddRegionForMonitoringFinished_customID_error" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"regions": argregions == nil ? [NSNull null] : argregions, @"customID": argcustomID == nil ? [NSNull null] : argcustomID, @"error": argerror == nil ? [NSNull null] : argerror}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
- (void)amapGeoFenceManager : (AMapGeoFenceManager*)manager didGeoFencesStatusChangedForRegion: (AMapGeoFenceRegion*)region customID: (NSString*)customID error: (NSError*)error
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapGeoFenceManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapGeoFenceManagerDelegate::amapGeoFenceManager_didGeoFencesStatusChangedForRegion_customID_error");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapGeoFenceManager* argmanager = manager;
|
||||
// ref callback arg
|
||||
AMapGeoFenceRegion* argregion = region;
|
||||
// ref callback arg
|
||||
NSString* argcustomID = customID;
|
||||
// ref callback arg
|
||||
NSError* argerror = error;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapGeoFenceManager_didGeoFencesStatusChangedForRegion_customID_error" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"region": argregion == nil ? [NSNull null] : argregion, @"customID": argcustomID == nil ? [NSNull null] : argcustomID, @"error": argerror == nil ? [NSNull null] : argerror}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
@ -0,0 +1,21 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AMapLocationKit/AMapLocationKit.h>
|
||||
|
||||
@protocol FlutterPluginRegistrar;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AMapLocationManagerDelegate_Anonymous : NSObject<AMapLocationManagerDelegate>
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
224
ios/Classes/Anonymous/AMapLocationManagerDelegate_Anonymous.m
Normal file
224
ios/Classes/Anonymous/AMapLocationManagerDelegate_Anonymous.m
Normal file
@ -0,0 +1,224 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AMapLocationManagerDelegate_Anonymous.h"
|
||||
#import <Flutter/Flutter.h>
|
||||
#import "FluttifyMessageCodec.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation AMapLocationManagerDelegate_Anonymous
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_registrar = registrar;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)amapLocationManager : (AMapLocationManager*)manager doRequireLocationAuth: (CLLocationManager*)locationManager
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapLocationManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapLocationManagerDelegate::amapLocationManager_doRequireLocationAuth");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapLocationManager* argmanager = manager;
|
||||
// ref callback arg
|
||||
CLLocationManager* arglocationManager = locationManager;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapLocationManager_doRequireLocationAuth" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"locationManager": arglocationManager == nil ? [NSNull null] : arglocationManager}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
- (void)amapLocationManager : (AMapLocationManager*)manager didFailWithError: (NSError*)error
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapLocationManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapLocationManagerDelegate::amapLocationManager_didFailWithError");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapLocationManager* argmanager = manager;
|
||||
// ref callback arg
|
||||
NSError* argerror = error;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapLocationManager_didFailWithError" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"error": argerror == nil ? [NSNull null] : argerror}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
- (void)amapLocationManager : (AMapLocationManager*)manager didUpdateLocation: (CLLocation*)location
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapLocationManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapLocationManagerDelegate::amapLocationManager_didUpdateLocation");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapLocationManager* argmanager = manager;
|
||||
// ref callback arg
|
||||
CLLocation* arglocation = location;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapLocationManager_didUpdateLocation" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"location": arglocation == nil ? [NSNull null] : arglocation}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
- (void)amapLocationManager : (AMapLocationManager*)manager didUpdateLocation: (CLLocation*)location reGeocode: (AMapLocationReGeocode*)reGeocode
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapLocationManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapLocationManagerDelegate::amapLocationManager_didUpdateLocation_reGeocode");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapLocationManager* argmanager = manager;
|
||||
// ref callback arg
|
||||
CLLocation* arglocation = location;
|
||||
// ref callback arg
|
||||
AMapLocationReGeocode* argreGeocode = reGeocode;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapLocationManager_didUpdateLocation_reGeocode" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"location": arglocation == nil ? [NSNull null] : arglocation, @"reGeocode": argreGeocode == nil ? [NSNull null] : argreGeocode}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
- (void)amapLocationManager : (AMapLocationManager*)manager didChangeAuthorizationStatus: (CLAuthorizationStatus)status
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapLocationManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapLocationManagerDelegate::amapLocationManager_didChangeAuthorizationStatus");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapLocationManager* argmanager = manager;
|
||||
// enum callback arg
|
||||
NSNumber* argstatus = @((NSInteger) status);
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapLocationManager_didChangeAuthorizationStatus" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"status": argstatus == nil ? [NSNull null] : argstatus}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
- (void)amapLocationManager : (AMapLocationManager*)manager locationManagerDidChangeAuthorization: (CLLocationManager*)locationManager
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapLocationManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapLocationManagerDelegate::amapLocationManager_locationManagerDidChangeAuthorization");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapLocationManager* argmanager = manager;
|
||||
// ref callback arg
|
||||
CLLocationManager* arglocationManager = locationManager;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapLocationManager_locationManagerDidChangeAuthorization" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"locationManager": arglocationManager == nil ? [NSNull null] : arglocationManager}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
- (BOOL)amapLocationManagerShouldDisplayHeadingCalibration : (AMapLocationManager*)manager
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapLocationManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapLocationManagerDelegate::amapLocationManagerShouldDisplayHeadingCalibration");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapLocationManager* argmanager = manager;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapLocationManagerShouldDisplayHeadingCalibration"
|
||||
arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager}
|
||||
result:^(id result) {}]; // 由于结果是异步返回, 这里用不上, 所以就不生成代码了
|
||||
});
|
||||
|
||||
// 由于flutter无法同步调用method channel, 所以暂不支持有返回值的回调方法
|
||||
// 相关issue https://github.com/flutter/flutter/issues/28310
|
||||
NSLog(@"暂不支持有返回值的回调方法");
|
||||
|
||||
////////////////////////////如果需要手写代码, 请写在这里/////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)amapLocationManager : (AMapLocationManager*)manager didUpdateHeading: (CLHeading*)newHeading
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"AMapLocationManagerDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"AMapLocationManagerDelegate::amapLocationManager_didUpdateHeading");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
AMapLocationManager* argmanager = manager;
|
||||
// ref callback arg
|
||||
CLHeading* argnewHeading = newHeading;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"amapLocationManager_didUpdateHeading" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"newHeading": argnewHeading == nil ? [NSNull null] : argnewHeading}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@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 "AmapLocationFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapLocationFluttifyPlugin (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 AmapLocationFluttifyPlugin (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 "AmapLocationFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapLocationFluttifyPlugin (SubHandler0)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler0;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
5214
ios/Classes/SubHandler/SubHandler0.m
Normal file
5214
ios/Classes/SubHandler/SubHandler0.m
Normal file
File diff suppressed because it is too large
Load Diff
13
ios/Classes/SubHandler/SubHandler1.h
Normal file
13
ios/Classes/SubHandler/SubHandler1.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapLocationFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapLocationFluttifyPlugin (SubHandler1)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler1;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
2616
ios/Classes/SubHandler/SubHandler1.m
Normal file
2616
ios/Classes/SubHandler/SubHandler1.m
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user