value property
Gets the value of the JSON date field.
Returns:
- The
DateTime
value, or the current date and time if the value is null.
Implementation
@override
DateTime get value {
return rawValue ?? DateTime.now();
}
Sets the value of the JSON date field.
Parameters:
value
: The new value of the field.
Implementation
@override
set value(dynamic value) {
if (value is String) {
rawValue = DateTime.tryParse(value);
return;
}
rawValue = value;
}