value property
Gets the value of the JSON number field.
Returns:
- The numeric value, or 0 if the value is null.
Implementation
@override
num get value => rawValue ?? 0;
Sets the value of the JSON number field.
Parameters:
value
: The new value of the field.
Implementation
@override
set value(dynamic value) {
if (value is num?) {
rawValue = value;
return;
}
if (value is String) {
rawValue = num.tryParse(value);
return;
}
}