moform
0.2.11, released 10 months ago by tienisto.com
Reactive, type-safe form fields for Flutter without managing TextEditingControllers.
What it does
Provides a thin wrapper around Flutter's TextFormField for various data types (String, int, double, DateTime, TimeOfDay). Automatically updates the UI when values change without needing explicit TextEditingController management.
AI-written summary of version 0.2.11, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want type-safe form inputs for strings, numbers, and dates without boilerplate.
- You prefer model-driven form state where changing values automatically updates the UI.
Skip it when
- You need complex multi-field cross-validation frameworks.
- You are using a heavy reactive form architecture that already provides its own controllers.
Strengths
- Removes the overhead of managing TextEditingController instances.
- Type-safe support for numbers, strings, and dates/times out of the box.
- Supports custom number formatting and optional nullable values.
Weaknesses
- Limited to single-field reactive widgets rather than a comprehensive form state manager.
- Relies on standard TextFormField behavior underneath.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
flutter_localizations should be added to dependencies for localization support if needed.
StringField(
value: email,
onChanged: (value) {
setState(() => email = value);
},
)Alternatives
Packages that do the same job and could replace moform.
- reactive_forms_generator
Generator for type-safe reactive forms based on data models.
72Compare - reactive_dropdown_search
A wrapper around dropdown_search to use with reactive_forms.
54Compare - reactive_phone_form_field
Reactive wrapper for phone_form_field to use with reactive_forms.
53Compare - reactive_forms_annotations
Annotations for reactive_forms_generator to generate form models
68Compare
Works with
Packages commonly used together with moform: ones it builds on, ones built on it, and its own family.