mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-27 17:29:50 +08:00
ios quick_actions: Add workaround
https://github.com/flutter/flutter/issues/13634
This commit is contained in:
@ -329,4 +329,12 @@ bool handleError(FlutterResult result, int err) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// For quick_actions - https://github.com/flutter/flutter/issues/13634
|
||||
- (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL succeeded))completionHandler {
|
||||
FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController;
|
||||
|
||||
FlutterMethodChannel* channel = [FlutterMethodChannel methodChannelWithName:@"plugins.flutter.io/quick_actions" binaryMessenger:controller];
|
||||
[channel invokeMethod:@"launch" arguments:shortcutItem.type];
|
||||
}
|
||||
@end
|
||||
|
Reference in New Issue
Block a user