FormField<T> constructor
Null safety
- {Key? key,
- required FormFieldBuilder<
T> builder, - FormFieldSetter<
T> ? onSaved, - FormFieldValidator<
T> ? validator, - T? initialValue,
- bool enabled = true,
- AutovalidateMode? autovalidateMode,
- String? restorationId}
Creates a single form field.
The builder argument must not be null.
Implementation
const FormField({
super.key,
required this.builder,
this.onSaved,
this.validator,
this.initialValue,
this.enabled = true,
AutovalidateMode? autovalidateMode,
this.restorationId,
}) : assert(builder != null),
autovalidateMode = autovalidateMode ?? AutovalidateMode.disabled;