环境
- Dart 2.8.4
- Flutter 1.17.3
- macOS Catalina 10.15.5
- vs code 1.46.0
问题
iOS 模拟的时候,vs code 控制台抛出: Trying to embed a platform view but the PrerollContext does not support embedding
解决方案
- 在
ios/Runner/Info.plist
中,添加如下代码:
<key>io.flutter.embedded_views_preview</key>
<true/>
- 重启 vs code 和 模拟器,即可生效