| Flutter iOS Embedder |

Instance Methods | Class Methods | List of all members
FlutterPlatformPlugin Class Reference

`#import <FlutterPlatformPlugin.h>`

Inheritance diagram for FlutterPlatformPlugin:

## Instance Methods
(instancetype) | - NS_UNAVAILABLE
(instancetype) | - initWithEngine:
(void) | - handleMethodCall:result:

## Class Methods
(instancetype) | + NS_UNAVAILABLE

## Detailed Description

Definition at line 11 of file FlutterPlatformPlugin.h.

## Method Documentation

## ◆ handleMethodCall:result:

- (void) handleMethodCall: |  | (FlutterMethodCall*) | call
result: |  | (FlutterResult) | result

Definition at line 106 of file FlutterPlatformPlugin.mm.

106 :(FlutterMethodCall*)call result:(FlutterResult)result {
107 NSString* method = call.method;
108 id args = call.arguments;
109 if ([method isEqualToString:@"SystemSound.play"]) {
110 [self playSystemSound:args];
111 result(nil);
112 } else if ([method isEqualToString:@"HapticFeedback.vibrate"]) {
113 [self vibrateHapticFeedback:args];
114 result(nil);
115 } else if ([method isEqualToString:@"SystemChrome.setPreferredOrientations"]) {
116 [self setSystemChromePreferredOrientations:args];
117 result(nil);
118 } else if ([method isEqualToString:@"SystemChrome.setApplicationSwitcherDescription"]) {
119 [self setSystemChromeApplicationSwitcherDescription:args];
120 result(nil);
121 } else if ([method isEqualToString:@"SystemChrome.setEnabledSystemUIOverlays"]) {
122 [self setSystemChromeEnabledSystemUIOverlays:args];
123 result(nil);
124 } else if ([method isEqualToString:@"SystemChrome.setEnabledSystemUIMode"]) {
125 [self setSystemChromeEnabledSystemUIMode:args];
126 result(nil);
127 } else if ([method isEqualToString:@"SystemChrome.restoreSystemUIOverlays"]) {
128 [self restoreSystemChromeSystemUIOverlays];
129 result(nil);
130 } else if ([method isEqualToString:@"SystemChrome.setSystemUIOverlayStyle"]) {
131 [self setSystemChromeSystemUIOverlayStyle:args];
132 result(nil);
133 } else if ([method isEqualToString:@"SystemNavigator.pop"]) {
134 NSNumber* isAnimated = args;
135 [self popSystemNavigator:isAnimated.boolValue];
136 result(nil);
137 } else if ([method isEqualToString:@"Clipboard.getData"]) {
138 result([self getClipboardData:args]);
139 } else if ([method isEqualToString:@"Clipboard.setData"]) {
140 [self setClipboardData:args];
141 result(nil);
142 } else if ([method isEqualToString:@"Clipboard.hasStrings"]) {
143 result([self clipboardHasStrings]);
144 } else if ([method isEqualToString:@"LiveText.isLiveTextInputAvailable"]) {
145 result(@([self isLiveTextInputAvailable]));
146 } else if ([method isEqualToString:@"SearchWeb.invoke"]) {
147 [self searchWeb:args];
148 result(nil);
149 } else if ([method isEqualToString:@"LookUp.invoke"]) {
150 [self showLookUpViewController:args];
151 result(nil);
152 } else if ([method isEqualToString:@"Share.invoke"]) {
153 [self showShareViewController:args];
154 result(nil);
155 } else if ([method isEqualToString:@"ContextMenu.showSystemContextMenu"]) {
156 [self showSystemContextMenu:args];
157 result(nil);
158 } else if ([method isEqualToString:@"ContextMenu.hideSystemContextMenu"]) {
159 [self hideSystemContextMenu];
160 result(nil);
161 } else {
162 result(FlutterMethodNotImplemented);
163 }
164 }

References FlutterMethodCall::arguments, FlutterMethodNotImplemented, and FlutterMethodCall::method.

## ◆ initWithEngine:

- (instancetype) initWithEngine: |  | (FlutterEngine*) | NS_DESIGNATED_INITIALIZER |

Definition at line 85 of file FlutterPlatformPlugin.mm.

85 :(FlutterEngine*)engine {
86 FML_DCHECK(engine) << "engine must be set";
87 self = [super init];
88
89 if (self) {
90 _engine = engine;
91 NSObject* infoValue = [[NSBundle mainBundle]
92 objectForInfoDictionaryKey:@"UIViewControllerBasedStatusBarAppearance"];
93 #if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
94 if (infoValue != nil && ![infoValue isKindOfClass:[NSNumber class]]) {
95 FML_LOG(ERROR) << "The value of UIViewControllerBasedStatusBarAppearance in info.plist must "
96 "be a Boolean type.";
97 }
98 #endif
99 _enableViewControllerBasedStatusBarAppearance =
100 (infoValue == nil || [(NSNumber*)infoValue boolValue]);
101 }
102
103 return self;
104 }

References engine.

## ◆ NS_UNAVAILABLE [1/2]

- (instancetype) NS_UNAVAILABLE |  |  |

## ◆ NS_UNAVAILABLE [2/2]

+ (instancetype) NS_UNAVAILABLE |  |  |

The documentation for this class was generated from the following files:

- shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.h
- shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm

FlutterEngine
Definition: FlutterEngine.h:61
FlutterMethodNotImplemented
FLUTTER_DARWIN_EXPORT NSObject const * FlutterMethodNotImplemented
FlutterMethodCall::method
NSString * method
Definition: FlutterCodecs.h:233
FlutterMethodCall
Definition: FlutterCodecs.h:220
FlutterResult
void(^ FlutterResult)(id _Nullable result)
Definition: FlutterChannels.h:194
engine
id engine
Definition: FlutterTextInputPluginTest.mm:89
FlutterMethodCall::arguments
id arguments
Definition: FlutterCodecs.h:238