form_builder_asset_picker 1.1.1 form_builder_asset_picker: ^1.1.1 copied to clipboard
File picker Field for flutter_form_builder package. Used to select files as part of form input.
Asset picker Field for flutter_form_builder package. Used to select files as part of form input. It's for the web and mobile apps. Desktop wasn't tested.
This is a fork of form_builder_file_picker made by Danvick Miller.
import 'package:flutter_form_builder/flutter_form_builder.dart'; import 'package:form_builder_file_picker/form_builder_asset_picker.dart'; ... final List<String>? _allowedExtensions = ['png', 'pdf']; ... FormBuilderAssetPicker( name: 'pick-file', allowedExtensions: _allowedExtensions, allowMultiple: true, maxFiles: 5, type: FileType.custom, decoration: const InputDecoration(border: InputBorder.none), selector: Row( children: const [ Icon(Icons.file_upload), Text('Upload') ] ) )
Additional Notes #
After version 7.0.0 of "flutter_form_builder", you will need to install the package "form_builder_validators" if you wish to use their form validators.