Trying to embed a platform view but the PrerollContext does not support embedding
在Flutter开发中,使用 UiKitView 嵌入 iOS 原生 View时抛出异常:
Runner[1919:887281] [VERBOSE-2:platform_view_layer.cc(20)] Trying to embed a platform view but the PrerollContext does not support embedding
这时因为 iOS 端的UiKitView目前还只是preview状态, 默认是不支持的, 需要手动打开开关, 在info.plist文件中新增一行io.flutter.embedded_views_preview为true.
解决方法图示:
Flutter 中嵌入Android View与iOS原生View分析文章
本公众号会首发系列专题文章,付费的视频课程会在公众号中免费刊登,在你上下班的路上或者是睡觉前的一刻,本公众号都是你浏览知识干货的一个小选择,收藏不如行动,在那一刻,公众号会提示你该学习了。