2

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.

Nadim Gouia
  • 141
  • 1
  • 2
  • 7

2 Answers2

2

There are two options:

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");
      }
    });
  }
  • 3
    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](/help/how-to-answer). – Community Oct 10 '21 at 16:41