textFieldValue method

String? textFieldValue(
  1. String fieldName
)

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, or null if not set.
  • Throws: ArgumentError if the field doesn't exist.

Implementation

String? textFieldValue(String fieldName) {
  return textField(fieldName).value;
}