【发布时间】:2020-05-10 20:00:27
【问题描述】:
我正在尝试在我的颤振桌面项目中使用 image_picker 插件,但我认为这个插件没有与 Windows 桌面应用程序一起使用的实现。 有人有解决方案吗? Ps:我想使用 go-flutter 和 hover。
【问题讨论】:
标签: image flutter picker flutter-desktop
我正在尝试在我的颤振桌面项目中使用 image_picker 插件,但我认为这个插件没有与 Windows 桌面应用程序一起使用的实现。 有人有解决方案吗? Ps:我想使用 go-flutter 和 hover。
【问题讨论】:
标签: image flutter picker flutter-desktop
有两种选择:
【讨论】:
File image;
final picker = ImagePicker();
Future getImage(ImageSource src) async {
final pickedFile = await picker.getImage(source: src);
setState(() {
if (pickedFile != null) {
image = File(pickedFile.path);
} else {
print("no image selected");
}
});
}
【讨论】: