GSVG.fromJson constructor
Implementation
factory GSVG.fromJson(Map<String, dynamic> json) {
return GSVG(
utils.parseInt(json["x"]),
utils.parseInt(json["y"]),
utils.parseInt(json["width"]),
utils.parseInt(json["height"]),
GShape.listFrom(json['elements'] as List<Map<String, dynamic>>),
strokeColor: json.containsKey('strokeColor')
? PColor.from(json['strokeColor'])
: null,
strokeSize: json.containsKey('strokeSize')
? utils.parseInt(json['strokeSize'])
: null,
fillColor:
json.containsKey('fillColor') ? PColor.from(json['fillColor']) : null,
scaleX:
json.containsKey('scaleX') ? utils.parseInt(json['scaleX']) : null,
scaleY:
json.containsKey('scaleY') ? utils.parseInt(json['scaleY']) : null,
);
}