Code generation for former.
- Make sure
- Annotate your form class with
part '<file-name>.g.dart';before your class declaration
class YourForm = _YourForm with _$YourFormIndexable;
flutter pub get build_runner build
.g.dartfile should be generated next to the file that contains your form class.
- A mixin that makes your form class "indexable" with the bracket operator.
- An enum class that includes all the fields of your form. They are used when you need to specify what field a particular Former widget should control.
- A schema class that you should create when using the
Formerwidget. Use it to describe the requirements of your form, using either the built-in validators or create your own by implementing