jsonDecodedValue property
Returns int, double and bool and string as they are.
Implementation
@override
dynamic get jsonDecodedValue {
if (isSimpleJsonValue(_value)) {
return _value;
} else {
return stringValue;
}
}
void
jsonDecodedValue=(dynamic value)
Values of type int, double, bool and string are assigned directly to value
.
Values of type string are assigned to stringValue
Implementation
set jsonDecodedValue(dynamic value) {
if (value is String) {
stringValue = value;
} else if (isSimpleJsonValue(value)) {
this.value = value;
} else {
throw ArgumentError(
'Cannot assign json encoded value $value. The type ${value.runtimeType} is not supported.');
}
}