Closed grundid closed 2 years ago
Right now even if one selects FileType.any it is not possible to select images from the photo gallery on mobile devices. Therefore this pull request adds support for multiple buttons to open different file pickers for different file types.
For example:
FormBuilderFilePicker( name: "attachments", previewImages: false, allowMultiple: true, withData: true, typeSelectors: [ TypeSelector( type: FileType.any, selector: Row( children: <Widget>[ Icon(Icons.add_circle), Padding( padding: const EdgeInsets.only(left: 8.0), child: Text("Add documents"), ), ], ), ), if (!kIsWeb) TypeSelector( type: FileType.image, selector: Row( children: <Widget>[ Icon(Icons.add_photo_alternate), Padding( padding: const EdgeInsets.only(left: 8.0), child: Text("Add images"), ), ], ), ), ], )
Hi @grundid Thanks for contribution! Can fix the CodeFactor suggestion and add documentation about TypeSelector to Readme?
Thanks a lot
Right now even if one selects FileType.any it is not possible to select images from the photo gallery on mobile devices. Therefore this pull request adds support for multiple buttons to open different file pickers for different file types.
For example: