Flutter package
Auto Form Builder
Configuration-driven forms for Flutter: wizards, conditional fields and validation, without the boilerplate.
Apache-2.0
AndroidiOSLinuxmacOSWebWindows
Overview
Most Flutter forms end up as a wall of repeated TextFormField and validator boilerplate. auto_form_builder lets you describe a form as configuration instead: fields, validation, conditional visibility, computed values, input masks and draft saving, then renders it from a single AutoForm widget.
Features
- Multi-step form wizards
- Conditional field visibility based on other answers
- Computed fields derived from other field values
- Input masking and built-in validation
- Persistent draft saving
Installation
pubspec.yaml
dependencies:
auto_form_builder: ^1.0.1Usage
Dart
import 'package:auto_form_builder/auto_form_builder.dart';
final config = FormConfig(
fields: [
FormFieldConfig(
name: 'email',
type: FormFieldType.text,
label: 'Email Address',
validators: [
FieldValidator(type: 'required', message: 'Email is required'),
],
),
],
submitButtonText: 'Submit',
);
AutoForm(
config: config,
onSubmit: (data) async {
print('Form submitted: \$data');
},
);Read this offline
The same write-up as a .docx file, if you'd rather share it or keep a copy.