flutter_fast_forms 2.0.0 copy "flutter_fast_forms: ^2.0.0" to clipboard
flutter_fast_forms: ^2.0.0 copied to clipboard

outdated

Enhances the Flutter SDK with form field wrappers, adaptive form field widgets and validation states to speed up form development.

Flutter Fast Forms #

CI Pub Version codecov

Flutter Fast Forms is a Dart package for building Flutter forms fast.

It adds these missing pieces to the Flutter SDK to make Flutter form development a breeze:


Getting Started #

1. Add a FastForm to your widget tree:

class MyFormPage extends StatelessWidget {
  MyFormPage({Key? key, required this.title}) : super(key: key);

  final formKey = GlobalKey<FormState>();
  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: SafeArea(
        child: SingleChildScrollView(
          child: FastForm(
            formKey: formKey,
            children: [],
          ),
        ),
      ),
    );
  }
}

2. Add FastFormControl<T> children to build up your form:

child: FastForm(
  formKey: formKey,
  children: [
    FastTextField(
      id: 'field_destination',
      label: 'Destination',
      placeholder: 'Where are you going?',
    ),
    FastDateRangePicker(
      id: 'field_check_in_out',
      label: 'Check-in - Check-out',
      firstDate: DateTime.now(),
      lastDate: DateTime.now().add(const Duration(days: 365)),
    ),
    FastCheckbox(
      id: 'field_travel_purpose',
      label: 'Travel purpose',
      title: 'I am travelling for work',
    ),
  ],
)

3. Wrap children with FastFormSection for grouping and consistent padding:

child: FastForm(
  formKey: formKey,
  children: [
    FastFormSection(
      header: const Text('My Form'),
      padding: EdgeInsets.all(16.0),
      children: [
        FastTextField(
          id: 'field_destination',
          label: 'Destination',
          placeholder: 'Where are you going?',
        ),
        // ...
      ],
    ),
  ]
)

Widget Catalog #

adaptive
FastFormControl<T>
adopts
Material
adopts
Cupertino
requires
Material Widget ancestor
when adaptive: true
FastAutocomplete Autocomplete no yes
FastCheckbox CheckboxListTile no yes
FastChoiceChips ChoiceChip no yes
FastCalendar CalendarDatePicker no yes
FastDatePicker showDatePicker CupertinoDatePicker no
FastDateRangePicker showDateRangePicker no yes
FastDropdown DropdownButtonFormField
<String>
no yes
FastRadioGroup RadioListTile no yes
FastRangeSlider RangeSlider no yes
FastSegmentedControl no SlidingSegmenteControl
<String>
no
FastSlider Slider.adaptive CupertinoSlider no
FastSwitch SwitchListTile CupertinoSwitch no
FastTextField TextFormField CupertinoTextFormFieldRow no
FastTimePicker showTimePicker no / use FastDatePicker
with
CupertinoDatePickerMode.time
yes
70
likes
0
pub points
86%
popularity

Publisher

verified publisherudos86.de

Enhances the Flutter SDK with form field wrappers, adaptive form field widgets and validation states to speed up form development.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, intl

More

Packages that depend on flutter_fast_forms