advanced_forms
0.3.0, released 3 weeks ago by leancode.co
Flutter form validation and state management with typed controllers and validators.
What it does
Provides typed field controllers for text, checkboxes, dropdowns, and multi-select fields, along with built-in sync and async validation, cross-field rules, and subforms. It manages form-level state and integrates with custom validation modes.
AI-written summary of version 0.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need complex form validation with async checks or cross-field dependencies.
- You want typed field controllers without writing code generation.
- You need to handle nested subforms and dynamic fields.
Skip it when
- You are looking for simple built-in Flutter Form and TextFormField widgets without a custom controller architecture.
- You require a code-generation-based form library.
Strengths
- Typed field controllers and composable validators out of the box.
- Supports async validation with debouncing and timeout handling.
- Granular rebuilds per field instead of rebuilding the entire form.
- Handles nested subforms and conditional sections easily.
Weaknesses
- Requires adopting a specific controller architecture rather than standard Flutter Form fields.
- Migration from standard Flutter forms requires rewriting form logic and controllers.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
class SignupFormController extends AdvancedFormController {
SignupFormController() {
registerFields([firstName, lastName]);
}
final firstName = AdvancedTextFieldController(
validator: filled('First name is required'),
);
final lastName = AdvancedTextFieldController(
validator: filled('Last name is required'),
);
Future<void> submit() async {
if (await validate()) {
// send it
}
}
}Alternatives
Packages that do the same job and could replace advanced_forms.
- acanthis
A type-safe and composable data validation library for Dart and Flutter.
75Compare - otp_text_field
A Flutter widget to create customizable OTP and PIN input fields.
75Compare - form_validator
Simplest form validation library for Flutter's form field widgets.
50Compare - fform
Build forms with fields, validations, and state management in Flutter.
67Compare
Works with
Packages commonly used together with advanced_forms: ones it builds on, ones built on it, and its own family.