ios quick_actions: Add workaround

https://github.com/flutter/flutter/issues/13634
This commit is contained in:
Vishesh Handa
2020-10-21 00:40:35 +02:00
parent 035c4f2d3b
commit 83ecfe239e

View File

@ -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