GSVGPath.fromJson constructor

GSVGPath.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory GSVGPath.fromJson(Map<String, dynamic> json) {
  return GSVGPath(
    (json['paths'] as List)
        .map((l) => GShape.from(l))
        .whereType<GPath>()
        .toList(),
    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,
  );
}