decodePanAndZoomBehavior<D> static method
Decodes the object from a Map-like dynamic structure. This expects the JSON format to be of the following structure:
{
"panningCompletedCallback": <VoidCallback>
}
Implementation
static charts.PanAndZoomBehavior<D>? decodePanAndZoomBehavior<D>(
dynamic map, {
bool validate = true,
}) {
charts.PanAndZoomBehavior<D>? result;
if (map is charts.PanAndZoomBehavior<D>) {
result = map;
} else if (map != null) {
assert(SchemaValidator.validate(
schemaId: '$_baseSchemaUrl/pan_and_zoom_behavior',
value: map,
validate: validate,
));
result = charts.PanAndZoomBehavior<D>(
panningCompletedCallback: map['panningCompletedCallback'],
);
}
return result;
}