TextFieldState constructor
TextFieldState(})
Creates a new instance of TextFieldState.
value
: The initial value of the text input field.label
: The label or name of the text input form field (required).rules
: The list of validation rules to apply to the text field (default is an empty list).validateOnUpdate
: Indicates whether validation should occur on updates (default istrue
).touched
: Indicates whether the field has been touched (interacted with) by the user (default isfalse
).
Implementation
TextFieldState(
String? value, {
required String label,
String? error,
List<ValidationRule<String?>> rules = const [],
bool validateOnUpdate = true,
bool touched = false,
}) : super(
value: value,
error: error,
label: label,
rules: rules,
validateOnUpdate: validateOnUpdate,
touched: touched,
);