castJSON static method
Implementation
static castJSON(Map<String, dynamic> json) {
String _type = json["type"];
if (_type == "Shape") {
return Shape.fromJSON(json);
} else if (_type == "Curve") {
return Curve.fromJSON(json);
} else if (_type == "LineCurve") {
return LineCurve.fromJSON(json);
} else {
throw " type: $_type Curve.castJSON is not support yet... ";
}
}