A model-driven Flutter form library inspired by Angular Reactive Forms, providing two-way binding and validation.
Reactive Forms is a Flutter package that provides a model-driven approach to building and validating forms, inspired by Angular Reactive Forms. It allows developers to define form controls, groups, and arrays programmatically, then bind them to UI widgets with automatic two-way data synchronization. The package solves the problem of managing complex form state, validation, and dynamic field interactions in Flutter applications.
Flutter developers building applications with complex forms, such as multi-step wizards, dynamic field arrays, or forms requiring advanced validation (including async validation). It's particularly useful for teams familiar with Angular's reactive forms pattern.
Developers choose Reactive Forms for its declarative model-driven design, extensive validation capabilities, and seamless integration with Flutter widgets. It reduces boilerplate code, provides a consistent API for form management, and offers features like FormBuilder for concise syntax and support for nested/dynamic forms out of the box.
This is a model-driven approach to handling form inputs and validations, heavily inspired in Angular's Reactive Forms
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Separates form logic from UI by defining forms as programmable hierarchies of FormGroup, FormArray, and FormControl, enabling cleaner code and easier testing, as highlighted in the README's emphasis on declarative design.
Offers built-in validators (e.g., required, email, pattern) and supports custom synchronous/asynchronous validators with debounce control, essential for complex forms like email uniqueness checks.
FormArray allows runtime addition/removal of controls, facilitating dynamic forms such as multi-item lists or wizard steps without manual state management.
Reduces boilerplate with syntactic sugar (e.g., fb.group) for quicker form setup, making code more readable compared to verbose FormControl declarations.
The README notes version conflicts with the intl package in v8.x and multiple migration guides, indicating breaking changes that can disrupt projects during upgrades.
Advanced widgets (e.g., date pickers, file pickers) are split into a separate reactive_forms_widgets package, adding complexity and requiring extra dependencies for full functionality.
Even with FormBuilder, simple forms demand more setup than Flutter's native TextFormField, making it overkill for trivial use cases without dynamic needs.