flutter-form-builder-ecosystem / form_builder_image_picker

Images picker field for FlutterFormBuilder. Get images from gallery or camera
https://pub.dev/packages/form_builder_image_picker
BSD 3-Clause "New" or "Revised" License
33 stars 62 forks source link

Desktop support #45

Open divan opened 1 year ago

divan commented 1 year ago

Similar to https://github.com/flutter-form-builder-ecosystem/form_builder_file_picker/issues/57, opening image on desktop platforms should be as easy as having file picker.

I'd love to have image cropping as well (as it seems to be a most common operation when dealing with files upload), but the first step is to make it work for desktop.

What's needed to be done to make it work on desktop?

fehernyul commented 1 year ago

Hi, Thank you for this plugin, it is very useful.

Please add desktop (Windows) support. Thank you!

deandreamatias commented 1 year ago

This package use image_picker and won't add more dependencies

divan commented 1 year ago

@deandreamatias, no one is asking to add more dependencies.

The question is whether anyone is interested in making this package compatible with desktop. Maybe it includes raising an issue in ImagePicker or writing your own native plugins, or at least outlining what holds this plugin from being cross-platform.

Again, it's really frustrating betting on this form ecosystem (including writing your own fields and code generators) and then discovering that you can't use such a ubiquitous thing as image upload because of a lack of desktop support.

Can you at least outline your thoughts on what holds this package to support desktop and how it can possibly be done? So other people can read it and possibly contribute. As far as I understood, there are no technical issues. It's just a lack of interest in a few packages. Seems like a solvable problem to me; just needed to be clearly described.

deandreamatias commented 1 year ago

Hi @divan Really sorry for my comment, was rude and that's no made sense to this issue. Yesterday was in a overwhelmed day.

Will be really nice the support of desktop for this field.

My concerns about this issue: We need found some solution to no increase the package dependencies and make the most simple possible to will be easier to maintain. Currently, image_picker is only for mobile and web, so will be a complex task (I guess) able desktop support.

My concerns about ecosystem: Have been hard to maintain almost alone all packages, so I will simplify some process and fields to be easier to maintain

Thanks for you all contributions on different packages (I remember you avatar and username for other places). And again, apologies for my comment

divan commented 1 year ago

@deandreamatias, no worries, and I totally share your position about minimizing dependencies.

Image Picker for desktop is essentially a file picker. file_picker plugin that is used already in https://github.com/flutter-form-builder-ecosystem/form_builder_file_picker has support for desktop. That's why I'm confident that there are no technical issues.

Another reason for doubling down on desktop support is that many people use desktop builds for dev workflow. For example, developing mobile apps, 99% of the time I'm not running iOS/Android emulators or running a physical device, but run a macOS build with https://pub.dev/packages/device_preview package, and it's a really nice experience.

My concerns about ecosystem: Have been hard to maintain almost alone all packages,

I can imagine! For a project of this scale you, for sure, have to look for maintainers and help.

sudormrfbin commented 1 year ago

Desktop support was added for image_picker in https://github.com/flutter/packages/pull/3882, and it works well when tested inside form builder 🎉 (you might need to do a flutter clean before running the app).

deandreamatias commented 1 year ago

I updated the image_picker version (main branch). Also, I added the linux platform to example, but couldn't test. If some one can add Window and MacOs platform, I will appreciate