我有颤振应用程序,它为每个平台(移动、网络、窗口)使用不同的 webview 插件。
虽然我能够import
基于web
和平台mobile
,但我无法为 Windows 导入。
如果它不是移动设备或网络,我尝试添加其他条件,但它正在mobile
使用插件。
- 这就是我为网络和移动(工作)导入包的方式。
import 'package:eam_flutter/form/mobileui.dart'
if (dart.library.html) 'package:eam_flutter/form/webui.dart'
as multiPlatform;
- 这就是我为 web、mobile 和 windows 导入包的方式(不工作,它显示移动 webview 异常,因为它不支持桌面)。
import 'package:eam_flutter/form/windowui.dart'
if (dart.library.html) 'package:eam_flutter/form/webui.dart'
if (dart.library.io) 'package:eam_flutter/form/mobileui.dart'
as multiPlatform;
如何为 Windows 指定条件导入?