AppDelegate

Inheritance: AppDelegate => FlutterAppDelegate => UIResponder

class

FlutterBinaryMessenger.h

typedef void (^FlutterBinaryReply)(NSData* _Nullable reply); typedef void (^FlutterBinaryMessageHandler)(NSData* _Nullable message, FlutterBinaryReply reply); @protocol FlutterBinaryMessenger <NSObject> - (void)sendOnChannel:(NSString*)channel message:(NSData* _Nullable)message;  - (void)sendOnChannel:(NSString*)channel message:(NSData* _Nullable)message binaryReply:(FlutterBinaryReply _Nullable)callback; - (void)setMessageHandlerOnChannel:(NSString*)channel
              binaryMessageHandler:(FlutterBinaryMessageHandler _Nullable)handler;
@end
Copy the code

FlutterViewController

@class FlutterEngine;


extern NSNotificationName const FlutterSemanticsUpdateNotification;


@interface FlutterViewController : UIViewController <FlutterTextureRegistry, FlutterPluginRegistry>


- (instancetype)initWithEngine:(FlutterEngine*)engine
                       nibName:(nullable NSString*)nibName
                        bundle:(nullable NSBundle*)nibBundle;


- (instancetype)initWithProject:(nullable FlutterDartProject*)project
                        nibName:(nullable NSString*)nibName
                         bundle:(nullable NSBundle*)nibBundle NS_DESIGNATED_INITIALIZER;

- (void)handleStatusBarTouches:(UIEvent*)event;


- (void)setFlutterViewDidRenderCallback:(void (^)(void))callback;


- (NSString*)lookupKeyForAsset:(NSString*)asset;


- (NSString*)lookupKeyForAsset:(NSString*)asset fromPackage:(NSString*)package;


- (void)setInitialRoute:(NSString*)route;


- (void)popRoute;


- (void)pushRoute:(NSString*)route;


- (id<FlutterPluginRegistry>)pluginRegistry;


@property(nonatomic, readonly, getter=isDisplayingFlutterUI) BOOL displayingFlutterUI;


@property(strong, nonatomic) UIView* splashScreenView;


- (BOOL)loadDefaultSplashScreenView;


@property(nonatomic, getter=isViewOpaque) BOOL viewOpaque;


@property(weak, nonatomic, readonly) FlutterEngine* engine;


@property(nonatomic, readonly) NSObject<FlutterBinaryMessenger>* binaryMessenger;

@end

Copy the code

FlutterChannels

typedef void (^FlutterReply)(id _Nullable reply);

typedef void (^FlutterMessageHandler)(id _Nullable message, FlutterReply callback);

@interface FlutterBasicMessageChannel : NSObject

+ (instancetype)messageChannelWithName:(NSString*)name
                       binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;


+ (instancetype)messageChannelWithName:(NSString*)name
                       binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
                                 codec:(NSObject<FlutterMessageCodec>*)codec;


- (instancetype)initWithName:(NSString*)name
             binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
                       codec:(NSObject<FlutterMessageCodec>*)codec;


- (void)sendMessage:(id _Nullable)message;


- (void)sendMessage:(id _Nullable)message reply:(FlutterReply _Nullable)callback;

- (void)setMessageHandler:(FlutterMessageHandler _Nullable)handler;


- (void)resizeChannelBuffer:(NSInteger)newSize;

@end


typedef void (^FlutterResult)(id _Nullable result);


typedef void (^FlutterMethodCallHandler)(FlutterMethodCall* call, FlutterResult result);


extern NSObject const* FlutterMethodNotImplemented;



@interface FlutterMethodChannel : NSObject

+ (instancetype)methodChannelWithName:(NSString*)name
                      binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;


+ (instancetype)methodChannelWithName:(NSString*)name
                      binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
                                codec:(NSObject<FlutterMethodCodec>*)codec;

- (instancetype)initWithName:(NSString*)name
             binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
                       codec:(NSObject<FlutterMethodCodec>*)codec;


- (void)invokeMethod:(NSString*)method arguments:(id _Nullable)arguments;

- (void)invokeMethod:(NSString*)method
           arguments:(id _Nullable)arguments
              result:(FlutterResult _Nullable)callback;

- (void)setMethodCallHandler:(FlutterMethodCallHandler _Nullable)handler;


- (void)resizeChannelBuffer:(NSInteger)newSize;

@end


typedef void (^FlutterEventSink)(id _Nullable event);


@protocol FlutterStreamHandler

- (FlutterError* _Nullable)onListenWithArguments:(id _Nullable)arguments
                                       eventSink:(FlutterEventSink)events;


- (FlutterError* _Nullable)onCancelWithArguments:(id _Nullable)arguments;
@end


extern NSObject const* FlutterEndOfEventStream;

@interface FlutterEventChannel : NSObject


+ (instancetype)eventChannelWithName:(NSString*)name
                     binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;


- (instancetype)initWithName:(NSString*)name
             binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
                       codec:(NSObject<FlutterMethodCodec>*)codec;

- (void)setStreamHandler:(NSObject<FlutterStreamHandler>* _Nullable)handler;
@end

Copy the code

FlutterEngine

@class FlutterViewController;

extern NSString* const FlutterDefaultDartEntrypoint;

@interface FlutterEngine : NSObject <FlutterTextureRegistry, FlutterPluginRegistry>


- (instancetype)initWithName:(NSString*)labelPrefix;


- (instancetype)initWithName:(NSString*)labelPrefix project:(nullable FlutterDartProject*)project;


- (instancetype)initWithName:(NSString*)labelPrefix
                     project:(nullable FlutterDartProject*)project
      allowHeadlessExecution:(BOOL)allowHeadlessExecution NS_DESIGNATED_INITIALIZER;

- (instancetype)init NS_UNAVAILABLE;

+ (instancetype)new NS_UNAVAILABLE;


- (BOOL)run;


- (BOOL)runWithEntrypoint:(nullable NSString*)entrypoint;


- (BOOL)runWithEntrypoint:(nullable NSString*)entrypoint libraryURI:(nullable NSString*)uri;


- (void)destroyContext;


- (void)ensureSemanticsEnabled;


@property(nonatomic, weak) FlutterViewController* viewController;


@property(nonatomic, readonly, nullable) FlutterMethodChannel* localizationChannel;

@property(nonatomic, readonly) FlutterMethodChannel* navigationChannel;


@property(nonatomic, readonly) FlutterMethodChannel* platformChannel;


@property(nonatomic, readonly) FlutterMethodChannel* textInputChannel;


@property(nonatomic, readonly) FlutterBasicMessageChannel* lifecycleChannel;


@property(nonatomic, readonly) FlutterBasicMessageChannel* systemChannel;


@property(nonatomic, readonly) FlutterBasicMessageChannel* settingsChannel;


@property(nonatomic, readonly, nullable) NSURL* observatoryUrl;


@property(nonatomic, readonly) NSObject<FlutterBinaryMessenger>* binaryMessenger;


@property(nonatomic, readonly, copy, nullable) NSString* isolateId;


@property(nonatomic, assign) BOOL isGpuDisabled;

@end



Copy the code