textFieldValue method
Retrieves the value of a text field for a specified fieldName
.
This method simplifies fetching the current value of a text field.
- Parameter
fieldName
The name of the text field to fetch. - Returns: The current value of the text field as a
String
, ornull
if not set. - Throws: ArgumentError if the field doesn't exist.
Implementation
String? textFieldValue(String fieldName) {
return textField(fieldName).value;
}