amap_map/ios/Classes/Category/FlutterMethodChannel+Method...

33 lines
859 B
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// FlutterMethodChannel+MethodCallDispatch.h
// amap_map
//
// Created by lly on 2020/11/16.
//
#import <Flutter/Flutter.h>
#import "AMapMethodCallDispatcher.h"
NS_ASSUME_NONNULL_BEGIN
@interface FlutterMethodChannel (MethodCallDispatch)
@property (nonatomic,strong,readonly) AMapMethodCallDispatcher* methodCallDispatcher;
/// 添加methodCall的回调注意使用该方法之后就不能再调用setMethodCallHandler: 方法了)
/// @param methodName methodName对应call的唯一方法名
/// @param handler 回调处理
- (void)addMethodName:(NSString *)methodName withHandler:(FlutterMethodCallHandler)handler;
/// 移除methodCall对应的回调
/// @param methodName 唯一的方法名
- (void)removeHandlerWithMethodName:(NSString *)methodName;
/// 清空所有的handler
- (void)clearAllHandler;
@end
NS_ASSUME_NONNULL_END