| 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 101 of file FlutterPlatformPlugin.mm.

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

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

## ◆ initWithEngine:

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

Definition at line 80 of file FlutterPlatformPlugin.mm.

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

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:114
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:196
engine
id engine
Definition: FlutterTextInputPluginTest.mm:89
FlutterMethodCall::arguments
id arguments
Definition: FlutterCodecs.h:238