Shape.fromJSON constructor

Shape.fromJSON(
  1. Map<String, dynamic> json
)

Implementation

Shape.fromJSON(Map<String, dynamic> json) : super.fromJSON(json) {
  type = "Shape";
  uuid = json["uuid"];
  holes = [];

  for (var i = 0, l = json["holes"].length; i < l; i++) {
    var hole = json["holes"][i];
    holes.add(Path.fromJSON(hole));
  }
}