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