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
fieldNameThe name of the text field to fetch. - Returns: The current value of the text field as a
String, ornullif not set. - Throws: ArgumentError if the field doesn't exist.
Implementation
String? textFieldValue(String fieldName) {
return textField(fieldName).value;
}