Path.fromJson constructor
Creates a new Path instance from a JSON object.
Implementation
factory Path.fromJson(Map<String, dynamic> json) {
return Path(
items: ((json[ApiFields.path] as List?) ?? [])
.map((shapePoint) => PathItem.fromJson(shapePoint))
.toList(),
);
}