Flutter macOS Embedder
FlutterPluginMacOS.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#import <Foundation/Foundation.h>
6
7
#import "
FlutterAppLifecycleDelegate.h
"
8
#import "
FlutterChannels.h
"
9
#import "
FlutterCodecs.h
"
10
#import "
FlutterMacros.h
"
11
12
NS_ASSUME_NONNULL_BEGIN
13
14
@protocol
FlutterPluginRegistrar
;
15
16
/**
17
* Implemented by the platform side of a Flutter plugin.
18
*
19
* Defines a set of optional callback methods and a method to set up the plugin
20
* and register it to be called by other application components.
21
*
22
* Currently the macOS version of FlutterPlugin has very limited functionality, but is expected to
23
* expand over time to more closely match the functionality of the iOS FlutterPlugin.
24
*/
25
FLUTTER_DARWIN_EXPORT
26
@protocol
FlutterPlugin
<NSObject,
FlutterAppLifecycleDelegate
>
27
28
/**
29
* Creates an instance of the plugin to register with |registrar| using the desired
30
* FlutterPluginRegistrar methods.
31
*/
32
+ (void)registerWithRegistrar:(
id
<
FlutterPluginRegistrar
>)registrar;
33
34
@optional
35
36
/**
37
* Called when a message is sent from Flutter on a channel that a plugin instance has subscribed
38
* to via -[FlutterPluginRegistrar addMethodCallDelegate:channel:].
39
*
40
* The |result| callback must be called exactly once, with one of:
41
* - FlutterMethodNotImplemented, if the method call is unknown.
42
* - A FlutterError, if the method call was understood but there was a
43
* problem handling it.
44
* - Any other value (including nil) to indicate success. The value will
45
* be returned to the Flutter caller, and must be serializable to JSON.
46
*/
47
- (void)handleMethodCall:(
FlutterMethodCall
*)call result:(
FlutterResult
)result;
48
49
NS_ASSUME_NONNULL_END
50
51
@end
FlutterPlugin-p
Definition:
FlutterPluginMacOS.h:26
NS_ASSUME_NONNULL_END
#define NS_ASSUME_NONNULL_END
Definition:
FlutterMacros.h:20
FlutterChannels.h
NS_ASSUME_NONNULL_BEGIN
#define NS_ASSUME_NONNULL_BEGIN
Definition:
FlutterMacros.h:19
FlutterMacros.h
FlutterPluginRegistrar-p
Definition:
FlutterPluginRegistrarMacOS.h:25
FlutterAppLifecycleDelegate-p
Definition:
FlutterAppLifecycleDelegate.h:21
FlutterMethodCall
Definition:
FlutterCodecs.h:220
FlutterResult
void(^ FlutterResult)(id _Nullable result)
Definition:
FlutterChannels.h:196
FlutterCodecs.h
FLUTTER_DARWIN_EXPORT
#define FLUTTER_DARWIN_EXPORT
Definition:
FlutterMacros.h:14
FlutterAppLifecycleDelegate.h
shell
platform
darwin
macos
framework
Headers
FlutterPluginMacOS.h
Generated by
1.8.17