advanced_forms 0.2.0+2 copy "advanced_forms: ^0.2.0+2" to clipboard
advanced_forms: ^0.2.0+2 copied to clipboard

Flutter form validation and state management — typed controllers for text, checkbox, dropdown and multi-select fields, async and cross-field validators, and subforms.

example/example.md

advanced_forms example app #

A gallery app for advanced_forms: one screen per documented pattern, reachable from the home page. Nearly every pattern named in README.md and MIGRATION.md has a working screen here — multi-select fields and read-only fields are the exceptions, documented in README — Field controllers and README — Read-only fields and server-side errors only.

How to run #

cd example
flutter pub get
flutter run

Any Flutter target works — the app uses no platform plugins.

Screen guide #

Screen (lib/screens/) Demonstrates Explained in
simple_form.dart Submit-time validation, async email check, timeout / failureToError, the hasFailedValidation banner, canSubmit on the button README — Async validation
password_form.dart Cross-field validation via subscribeToFields, a per-field validation mode via setValidationMode, a custom error type holding several rule violations README — Validation that depends on another field
optimized_rendering_form.dart Granular rebuilds and the child: optimization across three layouts README — Rendering fields
quiz_form.dart Applying a server response with setError / setError(null) README — Read-only fields and server-side errors
complex_form.dart Single-select dropdowns and swapping the active subform with addSubform / removeSubform README — Field controllers, README — Subforms
delivery_form.dart A dynamic list of subforms, validated and disposed by the parent README — Subforms
step_form.dart A multi-page wizard: one subform per page in a PageView, the wizard provided above them, await step.validate() on Next, the parent's validate() on Submit, and a conditional page that setValidationEnabled(false) drops from both the flow and the validation README — Subforms
scroll_form.dart Scrolling to the first invalid field with field.focusNode, plus a plain Stream for one-off UI events README — Rendering fields, MIGRATION 8

lib/widgets/ holds the reusable field widgets referenced from README — text, password, dropdown and switch fields — ready to copy and restyle. lib/controllers/password_field_controller.dart is a custom field controller written against AdvancedTextFieldController.

17
likes
150
points
27
downloads

Documentation

API reference

Publisher

verified publisherleancode.co

Weekly Downloads

Flutter form validation and state management — typed controllers for text, checkbox, dropdown and multi-select fields, async and cross-field validators, and subforms.

Repository (GitHub)
View/report issues

Topics

#form #validation #state-management #ui #widget

License

Apache-2.0 (license)

Dependencies

collection, equatable, flutter, meta

More

Packages that depend on advanced_forms