FormBuilder Extra Fields provides common ready-made form input fields for flutter_form_builder package. The package gives you a convenient way of adding common ready-made input fields instead of creating your own FormBuilderField from scratch.
- Add several type of inputs to
flutter_form_builder
The currently supported fields include:
FormBuilderColorPicker
- Input forColor
selectionFormBuilderRating
- For selection of a numerical value as a ratingFormBuilderSearchableDropdown
- Field for selecting value(s) from a searchable listFormBuilderSignaturePad
- Field with drawing pad on which user can doodleFormBuilderTouchSpin
- Selection of a number by tapping on a plus or minus iconFormBuilderTypeAhead
- Auto-completes user input from a list of items
In order to create an input field in the form, along with the label, and any applicable validation, there are several attributes that are supported by all types of inputs namely:
Attribute | Type | Default | Required | Description |
---|---|---|---|---|
name |
String |
Yes |
This will form the key in the form value Map | |
initialValue |
T |
null |
No |
The initial value of the input field |
enabled |
bool |
true |
No |
Determines whether the field widget will accept user input. |
decoration |
InputDecoration |
InputDecoration() |
No |
Defines the border, labels, icons, and styles used to decorate the field. |
validator |
FormFieldValidator<T> |
null |
No |
A FormFieldValidator that will check the validity of value in the FormField |
onChanged |
ValueChanged<T> |
null |
No |
This event function will fire immediately the the field value changes |
valueTransformer |
ValueTransformer<T> |
null |
No |
Function that transforms field value before saving to form value. e.g. transform TextField value for numeric field from String to num |
The rest of the attributes will be determined by the type of Widget being used. |
Each field has a dependency with your own configurations. Take a look on dependencies repositories to understand the behaviour and properties:
Field | Dependency |
---|---|
FormBuilderColorPicker |
flutter_colorpicker |
FormBuilderRating |
flutter_rating_bar |
FormBuilderSearchableDropdown |
dropdown_search |
FormBuilderSignaturePad |
signature |
FormBuilderTouchSpin |
No dependency |
FormBuilderTypeAhead |
flutter_typeahead |
No especific setup required: only install the dependency and use :)
final _formKey = GlobalKey<FormBuilderState>();
FormBuilder(
key: _formKey,
child: FormBuilderColorPickerField(
name: 'color_picker',
),
)
See pub.dev example tab or github code for more details
For more instructions about FormBuilder
, see flutter_form_builder package
You have some ways to contribute to this packages
- Beginner: Reporting bugs or request new features
- Intermediate: Implement new features (from issues or not) and created pull requests
- Advanced: Join to organization like a member and help coding, manage issues, dicuss new features and other things
See contribution file for more details
You can question or search answers on Github discussion or on StackOverflow
Donate or become a sponsor of Flutter Form Builder Ecosystem
- Add more widget tests and missing tests for some fields
- Remove or integrate dependencies and contribute with external dependencies
- Add visual examples (images, gifs, videos, sample application)
- Solve open issues, prioritizing bugs
Take a look to our awesome ecosystem and all packages in there
Made with contrib.rocks.