Am trying to user image_picker plugin in my flutter desktop project, but i think there is no implementation for this plugin that work with windows desktop app. Did someone have a solution for that ? Ps : i want use go-flutter and hover.
2 Answers
There are two options:
- Implement the plugin for Windows.
- Use FDE's file_chooser plugin (once the Windows implementation lands) and set a file type filter for the image types you want to allow.
Comments
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");
}
});
}
1 Comment
Community
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.