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.
Asked
Active
Viewed 3,657 times
2 Answers
2
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.

smorgan
- 20,228
- 3
- 47
- 55
0
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");
}
});
}
-
3Your 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](/help/how-to-answer). – Community Oct 10 '21 at 16:41