首页页面搭建完成

This commit is contained in:
2022-05-30 16:15:54 +08:00
parent c343dbbe83
commit 97f5525aa7
78 changed files with 1114 additions and 797 deletions

View File

@@ -31,8 +31,6 @@ typedef void (^FlutterBinaryMessageHandler)(NSData* _Nullable message, FlutterBi
typedef int64_t FlutterBinaryMessengerConnection;
@protocol FlutterTaskQueue;
/**
* A facility for communicating with the Flutter side using asynchronous message
* passing with binary messages.
@@ -46,16 +44,6 @@ typedef int64_t FlutterBinaryMessengerConnection;
*/
FLUTTER_DARWIN_EXPORT
@protocol FlutterBinaryMessenger <NSObject>
/// TODO(gaaclarke): Remove optional when macos supports Background Platform Channels.
@optional
- (NSObject<FlutterTaskQueue>*)makeBackgroundTaskQueue;
- (FlutterBinaryMessengerConnection)
setMessageHandlerOnChannel:(NSString*)channel
binaryMessageHandler:(FlutterBinaryMessageHandler _Nullable)handler
taskQueue:(NSObject<FlutterTaskQueue>* _Nullable)taskQueue;
@required
/**
* Sends a binary message to the Flutter side on the specified channel, expecting
* no reply.

View File

@@ -8,8 +8,6 @@
#import "FlutterBinaryMessenger.h"
#import "FlutterCodecs.h"
@protocol FlutterTaskQueue;
NS_ASSUME_NONNULL_BEGIN
/**
* A message reply callback.
@@ -26,8 +24,7 @@ typedef void (^FlutterReply)(id _Nullable reply);
* asynchronous replies back to Flutter.
*
* @param message The message.
* @param callback A callback for submitting a reply to the sender which can be invoked from any
* thread.
* @param callback A callback for submitting a reply to the sender.
*/
typedef void (^FlutterMessageHandler)(id _Nullable message, FlutterReply callback);
@@ -91,27 +88,6 @@ FLUTTER_DARWIN_EXPORT
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
codec:(NSObject<FlutterMessageCodec>*)codec;
/**
* Initializes a `FlutterBasicMessageChannel` with the specified name, binary
* messenger, and message codec.
*
* The channel name logically identifies the channel; identically named channels
* interfere with each other's communication.
*
* The binary messenger is a facility for sending raw, binary messages to the
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
*
* @param name The channel name.
* @param messenger The binary messenger.
* @param codec The message codec.
* @param taskQueue The FlutterTaskQueue that executes the handler (see
-[FlutterBinaryMessenger makeBackgroundTaskQueue]).
*/
- (instancetype)initWithName:(NSString*)name
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
codec:(NSObject<FlutterMessageCodec>*)codec
taskQueue:(NSObject<FlutterTaskQueue>* _Nullable)taskQueue;
/**
* Sends the specified message to the Flutter side, ignoring any reply.
*
@@ -166,7 +142,7 @@ typedef void (^FlutterResult)(id _Nullable result);
* Invoke the callback with a `FlutterError` to indicate that the call failed.
* Invoke the callback with `FlutterMethodNotImplemented` to indicate that the
* method was unknown. Any other values, including `nil`, are interpreted as
* successful results. This can be invoked from any thread.
* successful results.
*/
typedef void (^FlutterMethodCallHandler)(FlutterMethodCall* call, FlutterResult result);
@@ -237,27 +213,6 @@ FLUTTER_DARWIN_EXPORT
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
codec:(NSObject<FlutterMethodCodec>*)codec;
/**
* Initializes a `FlutterMethodChannel` with the specified name, binary messenger,
* method codec, and task queue.
*
* The channel name logically identifies the channel; identically named channels
* interfere with each other's communication.
*
* The binary messenger is a facility for sending raw, binary messages to the
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
*
* @param name The channel name.
* @param messenger The binary messenger.
* @param codec The method codec.
* @param taskQueue The FlutterTaskQueue that executes the handler (see
-[FlutterBinaryMessenger makeBackgroundTaskQueue]).
*/
- (instancetype)initWithName:(NSString*)name
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
codec:(NSObject<FlutterMethodCodec>*)codec
taskQueue:(NSObject<FlutterTaskQueue>* _Nullable)taskQueue;
// clang-format off
/**
* Invokes the specified Flutter method with the specified arguments, expecting
@@ -416,27 +371,6 @@ FLUTTER_DARWIN_EXPORT
- (instancetype)initWithName:(NSString*)name
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
codec:(NSObject<FlutterMethodCodec>*)codec;
/**
* Initializes a `FlutterEventChannel` with the specified name, binary messenger,
* method codec and task queue.
*
* The channel name logically identifies the channel; identically named channels
* interfere with each other's communication.
*
* The binary messenger is a facility for sending raw, binary messages to the
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
*
* @param name The channel name.
* @param messenger The binary messenger.
* @param codec The method codec.
* @param taskQueue The FlutterTaskQueue that executes the handler (see
-[FlutterBinaryMessenger makeBackgroundTaskQueue]).
*/
- (instancetype)initWithName:(NSString*)name
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
codec:(NSObject<FlutterMethodCodec>*)codec
taskQueue:(NSObject<FlutterTaskQueue>* _Nullable)taskQueue;
/**
* Registers a handler for stream setup requests from the Flutter side.
*

View File

@@ -219,9 +219,8 @@ FLUTTER_DARWIN_EXPORT
* FlutterDefaultDartEntrypoint (or nil); this will default to `main()`. If it is not the app's
* main() function, that function must be decorated with `@pragma(vm:entry-point)` to ensure the
* method is not tree-shaken by the Dart compiler.
* @param uri The URI of the Dart library which contains the entrypoint method
* (example "package:foo_package/main.dart"). If nil, this will default to
* the same library as the `main()` function in the Dart program.
* @param uri The URI of the Dart library which contains the entrypoint method. IF nil,
* this will default to the same library as the `main()` function in the Dart program.
* @return YES if the call succeeds in creating and running a Flutter Engine instance; NO otherwise.
*/
- (BOOL)runWithEntrypoint:(nullable NSString*)entrypoint libraryURI:(nullable NSString*)uri;
@@ -237,9 +236,8 @@ FLUTTER_DARWIN_EXPORT
* FlutterDefaultDartEntrypoint (or nil); this will default to `main()`. If it is not the app's
* main() function, that function must be decorated with `@pragma(vm:entry-point)` to ensure the
* method is not tree-shaken by the Dart compiler.
* @param libraryURI The URI of the Dart library which contains the entrypoint
* method (example "package:foo_package/main.dart"). If nil, this will
* default to the same library as the `main()` function in the Dart program.
* @param libraryURI The URI of the Dart library which contains the entrypoint method. IF nil,
* this will default to the same library as the `main()` function in the Dart program.
* @param initialRoute The name of the initial Flutter `Navigator` `Route` to load. If this is
* FlutterDefaultInitialRoute (or nil), it will default to the "/" route.
* @return YES if the call succeeds in creating and running a Flutter Engine instance; NO otherwise.
@@ -259,9 +257,8 @@ FLUTTER_DARWIN_EXPORT
* FlutterDefaultDartEntrypoint (or nil); this will default to `main()`. If it is not the app's
* main() function, that function must be decorated with `@pragma(vm:entry-point)` to ensure the
* method is not tree-shaken by the Dart compiler.
* @param libraryURI The URI of the Dart library which contains the entrypoint
* method (example "package:foo_package/main.dart"). If nil, this will
* default to the same library as the `main()` function in the Dart program.
* @param libraryURI The URI of the Dart library which contains the entrypoint method. IF nil,
* this will default to the same library as the `main()` function in the Dart program.
* @param initialRoute The name of the initial Flutter `Navigator` `Route` to load. If this is
* FlutterDefaultInitialRoute (or nil), it will default to the "/" route.
* @param entrypointArgs Arguments passed as a list of string to Dart's entrypoint function.