美文网首页
Flutter(iOS):原生跳转flutter页面出现Unha

Flutter(iOS):原生跳转flutter页面出现Unha

作者: 棋剑千秋 | 来源:发表于2020-04-26 15:33 被阅读0次
  • (void)pushFlutterViewController_EventChannel {
    FlutterViewController* flutterViewController = [[FlutterViewController alloc] initWithProject:nil nibName:nil bundle:nil];
    [flutterViewController setInitialRoute:@"test?id=47"];
    flutterViewController.splashScreenView.hidden = YES;
    [GeneratedPluginRegistrant registerWithRegistry:flutterViewController];
    // self.navigationController.navigationBarHidden = YES;
    [self.navigationController pushViewController:flutterViewController animated:NO];
    }
    在原生中需要跳转到flutter指定页现出现MissingPluginException错误:


    image.png

    解决方法-手动注册该插件:
    [GeneratedPluginRegistrant registerWithRegistry:flutterViewController];

相关文章

网友评论

      本文标题:Flutter(iOS):原生跳转flutter页面出现Unha

      本文链接:https://www.haomeiwen.com/subject/oaxjwhtx.html