from static method
Implementation
static GShape? from(Map<String, dynamic>? json) {
if (json == null) return null;
var shape = json['shape'];
switch (shape) {
case 'panel':
return GPanel.fromJson(json);
case 'rectangle':
return GRectangle.fromJson(json);
case 'line':
return GLine.fromJson(json);
case 'svg':
return GSVG.fromJson(json);
case 'svg_path':
return GSVGPath.fromJson(json);
default:
return null;
}
}