| 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 12 of file FlutterPlatformPlugin.h.

## Method Documentation

## ◆ handleMethodCall:result:

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

Definition at line 103 of file FlutterPlatformPlugin.mm.

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

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

## ◆ initWithEngine:

- (instancetype) initWithEngine: |  | (fml::WeakNSObject<FlutterEngine>) | NS_DESIGNATED_INITIALIZER |

Definition at line 82 of file FlutterPlatformPlugin.mm.

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

References _engine, and 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

_engine
fml::scoped_nsobject< FlutterEngine > _engine
Definition: FlutterViewController.mm:120
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