Flutter Engine
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 59 of file FlutterPlatformPlugin.mm.

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

Referenced by FlutterEngine::destroyContext.

59  :(FlutterMethodCall*)call result:(FlutterResult)result {
60  NSString* method = call.method;
61  id args = call.arguments;
62  if ([method isEqualToString:@"SystemSound.play"]) {
63  [self playSystemSound:args];
64  result(nil);
65  } else if ([method isEqualToString:@"HapticFeedback.vibrate"]) {
66  [self vibrateHapticFeedback:args];
67  result(nil);
68  } else if ([method isEqualToString:@"SystemChrome.setPreferredOrientations"]) {
69  [self setSystemChromePreferredOrientations:args];
70  result(nil);
71  } else if ([method isEqualToString:@"SystemChrome.setApplicationSwitcherDescription"]) {
72  [self setSystemChromeApplicationSwitcherDescription:args];
73  result(nil);
74  } else if ([method isEqualToString:@"SystemChrome.setEnabledSystemUIOverlays"]) {
75  [self setSystemChromeEnabledSystemUIOverlays:args];
76  result(nil);
77  } else if ([method isEqualToString:@"SystemChrome.restoreSystemUIOverlays"]) {
78  [self restoreSystemChromeSystemUIOverlays];
79  result(nil);
80  } else if ([method isEqualToString:@"SystemChrome.setSystemUIOverlayStyle"]) {
81  [self setSystemChromeSystemUIOverlayStyle:args];
82  result(nil);
83  } else if ([method isEqualToString:@"SystemNavigator.pop"]) {
84  NSNumber* isAnimated = args;
85  [self popSystemNavigator:isAnimated.boolValue];
86  result(nil);
87  } else if ([method isEqualToString:@"Clipboard.getData"]) {
88  result([self getClipboardData:args]);
89  } else if ([method isEqualToString:@"Clipboard.setData"]) {
90  [self setClipboardData:args];
91  result(nil);
92  } else if ([method isEqualToString:@"Clipboard.hasStrings"]) {
93  result([self clipboardHasStrings]);
94  } else {
96  }
97 }
G_BEGIN_DECLS FlValue * args
void(^ FlutterResult)(id _Nullable result)
FLUTTER_EXPORT NSObject const * FlutterMethodNotImplemented

◆ initWithEngine:()

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

◆ 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: