form_bloc
0.31.0, released 3 years ago by an unverified publisher
Easy form state management and validation using the BLoC pattern.
What it does
Separates form state and business logic from the user interface. It provides built-in support for synchronous and asynchronous field validation, wizard/stepper forms, submission progress, and dynamic fields.
AI-written summary of version 0.31.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building complex forms with custom validation rules in Flutter.
- You want to manage form state separately from UI widgets using the BLoC pattern.
Skip it when
- You only need simple uncontrolled forms with basic text controllers.
- You are not using the BLoC pattern or prefer simpler state management for forms.
Strengths
- Comprehensive feature set including async validation, wizard steps, and dynamic fields.
- Separates business logic and validation nicely from the UI.
- Built on top of the established bloc package.
Weaknesses
- Requires learning the form_bloc specific architecture.
- Can be overly verbose for trivial form use cases.
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 6
Requires adding form_bloc to your pubspec and integrating it with your BLoC structure.
not documentedAlternatives
Packages that do the same job and could replace form_bloc.
- advanced_forms
Flutter form validation and state management with typed controllers and validators.
85Compare - 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 - acanthis
A type-safe and composable data validation library for Dart and Flutter.
75Compare
Works with
Packages commonly used together with form_bloc: ones it builds on, ones built on it, and its own family.
- uuidform_bloc depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- equatableform_bloc depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- rxdartform_bloc depends on itImplementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
- blocform_bloc depends on itA Dart library for implementing the BLoC pattern with Cubits and Blocs.