FormField<T> constructor Null safety

const FormField<T>(
  1. {Key? key,
  2. required FormFieldBuilder<T> builder,
  3. FormFieldSetter<T>? onSaved,
  4. FormFieldValidator<T>? validator,
  5. T? initialValue,
  6. bool enabled = true,
  7. AutovalidateMode? autovalidateMode,
  8. String? restorationId}
)

Creates a single form field.

The builder argument must not be null.

Implementation

const FormField({
  Key? key,
  required this.builder,
  this.onSaved,
  this.validator,
  this.initialValue,
  this.enabled = true,
  AutovalidateMode? autovalidateMode,
  this.restorationId,
}) : assert(builder != null),
     autovalidateMode = autovalidateMode ?? AutovalidateMode.disabled,
     super(key: key);