Installation
Add advanced_forms to a Flutter app, check the requirements, and find the way in from 0.1.x.
flutter pub add advanced_formsThen import the one library the package exposes:
import 'package:advanced_forms/advanced_forms.dart';Requirements
| Flutter | 3.19.0 or newer |
| Dart | 3.3 or newer |
| Runtime dependencies | collection, equatable, meta — and Flutter itself |
| Code generation | none |
| Platforms | every platform Flutter supports; the package uses no plugins |
The package is developed against the lower bound, so an app on an older-but-supported Flutter is not an afterthought. Nothing in it is web- or mobile-specific.
Optional companions
None are required. Two are worth knowing about:
- A DI package —
ChangeNotifierProviderfromprovideris a one-line way to own a form controller and have it disposed for you. The example app uses it; aStatefulWidgetworks just as well. See Lifecycle and ownership. - An Agent Skill — if you write forms with Claude Code or another agent that supports
skills, copy
skills/advanced_forms/into your project and the agent generates idiomaticadvanced_formscode.
Coming from leancode_forms 0.1.x
advanced_forms 0.2 is the successor of leancode_forms, which is discontinued on pub.dev. The form-building
model is the same — fields, form controllers, validators, subforms — and the machinery underneath is new: bloc and
rxdart are gone, every *Cubit is an Advanced*Controller, and validation was rebuilt around named
validation modes.
The migration guide walks through the renames, the behaviour changes that compile but behave
differently, and the widget-side clean-up. Budget an hour for a medium-sized app; most of it is deleting
TextEditingController plumbing.