简体   繁体   English

我如何从多个已安装的应用程序中选择图像,而不仅仅是颤动中的相机或画廊

[英]How can i pick image from multiple installed app not only camera or gallery in flutter

In the app when user click the button then user can select any one app from installed app(which support image) and pick image from it and show it in imageview在应用程序中,当用户单击按钮时,用户可以从已安装的应用程序(支持图像)中选择任何一个应用程序并从中选择图像并在 imageview 中显示

like this but having gallery,photos and other installed app (pic 1)像这样,但有画廊、照片和其他已安装的应用程序(图 1)

在此处输入图片说明

when user tap on button this open and user select any installed app and pick image and show it in imageview in app当用户点击这个打开的按钮时,用户选择任何已安装的应用程序并选择图像并在应用程序的图像视图中显示它

I tried document_picker and file_picker and result is Pic 2我试过 document_picker 和 file_picker,结果是图 2

在此处输入图片说明

I want bottom sheet open as default os like "pic1" but I get result (pic 2)我希望底部工作表作为默认操作系统打开,如“pic1”,但我得到了结果(图 2)

I don't know how to do it in flutter so please give some suggestion我不知道如何在颤振中做到这一点,所以请给出一些建议

Try the file_picker plugin:试试 file_picker 插件:

https://pub.dev/packages/file_picker https://pub.dev/packages/file_picker

"Load files from cloud files (GDrive, Dropbox, iCloud)" “从云文件(GDrive、Dropbox、iCloud)加载文件”

If you only want images to be selected use this如果您只想选择图像,请使用此

allowedExtensions: ['jpg', 'png'],

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM