/form_builder_extra_fields

Additional ready-made form input fields for flutter_form_builder package

Primary LanguageDartBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Form Builder Extra Fields

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.

Pub Version GitHub Workflow Status Codecov CodeFactor Grade


Features

  • Add several type of inputs to flutter_form_builder

Inputs

The currently supported fields include:

  • FormBuilderColorPicker - Input for Color selection
  • FormBuilderRating - For selection of a numerical value as a rating
  • FormBuilderSearchableDropdown - Field for selecting value(s) from a searchable list
  • FormBuilderSignaturePad - Field with drawing pad on which user can doodle
  • FormBuilderTouchSpin - Selection of a number by tapping on a plus or minus icon
  • FormBuilderTypeAhead - Auto-completes user input from a list of items

Parameters

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.

Dependency parameters

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

Use

Setup

No especific setup required: only install the dependency and use :)

Basic 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

Support

Contribute

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

Questions and answers

You can question or search answers on Github discussion or on StackOverflow

Donations

Donate or become a sponsor of Flutter Form Builder Ecosystem

Become a Sponsor

Roadmap

Ecosystem

Take a look to our awesome ecosystem and all packages in there

Thanks to

Contributors

All constributors