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 Discord


Features

  • Add several type of inputs to flutter_form_builder

Inputs

The currently supported fields include:

  • FormBuilderChipsInput - Takes a list of Chips as input and suggests more options on typing
  • FormBuilderColorPicker - Input for Color selection
  • FormBuilderCupertinoDateTimePicker - For Date, Time and DateTime input using a Cupertino-style picker
  • 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:

AttributeTypeDefaultRequiredDescription
nameStringYesThis will form the key in the form value Map
initialValueTnullNoThe initial value of the input field
enabledbooltrueNoDetermines whether the field widget will accept user input.
decorationInputDecorationInputDecoration()NoDefines the border, labels, icons, and styles used to decorate the field.
validatorFormFieldValidator<T>nullNoA FormFieldValidator that will check the validity of value in the FormField
onChangedValueChanged<T>nullNoThis event function will fire immediately the the field value changes
valueTransformerValueTransformer<T>nullNoFunction 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.

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 pud.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 join to our Discord server or search answers in StackOverflow

Donations

Buy a coffe to Danvick Miller, creator of this awesome package

Buy me a coffee

Roadmap

Ecosystem

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

Thanks to

Contributors

Made with contrib.rocks.

Libraries

form_builder_extra_fields