FormFieldValidator<T> typedef Null safety

FormFieldValidator<T> = String? Function(T? value)

Signature for validating a form field.

Returns an error string to display if the input is invalid, or null otherwise.

Used by FormField.validator.

Implementation

typedef FormFieldValidator<T> = String? Function(T? value);