We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0e8e71 commit aca88cbCopy full SHA for aca88cb
ios/Classes/FlutterWebviewPlugin.m
@@ -15,7 +15,7 @@ + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
15
methodChannelWithName:CHANNEL_NAME
16
binaryMessenger:[registrar messenger]];
17
18
- UIViewController *viewController = (UIViewController *)registrar.messenger;
+ UIViewController *viewController = [UIApplication sharedApplication].delegate.window.rootViewController;
19
FlutterWebviewPlugin* instance = [[FlutterWebviewPlugin alloc] initWithViewController:viewController];
20
21
[registrar addMethodCallDelegate:instance channel:channel];
0 commit comments