FormModel constructor
FormModel(
- String type, {
- GlobalKey<
FormFieldState> ? key, - bool? required,
- String? requiredError,
- FormFieldValidator<
String> ? validator, - String? dataField,
- dynamic value,
Implementation
FormModel(this.type, {
GlobalKey<FormFieldState>? key,
bool? required,
String? requiredError,
FormFieldValidator<String>? validator,
this.dataField,
this.value
}) :
key = key ?? GlobalKey<FormFieldState>(),
required = required ?? false,
validator = (validator == null && required == true) ? requiredValidator(requiredError) : validator;