decodeRTLSpec static method
Decodes the object from a Map-like dynamic structure. This expects the JSON format to be of the following structure:
{
"axisDirection": <AxisDirection>
}
See also
Implementation
static charts.RTLSpec? decodeRTLSpec(
dynamic map, {
bool validate = true,
}) {
charts.RTLSpec? result;
if (map is charts.RTLSpec) {
result = map;
} else if (map != null) {
assert(SchemaValidator.validate(
schemaId: '$_baseSchemaUrl/rtl_spec',
value: map,
validate: validate,
));
result = charts.RTLSpec(
axisDirection: decodeAxisDirection(
map['axisDirection'],
validate: false,
)!,
);
}
return result;
}