toJSON method

  1. @override
dynamic toJSON()
override

Implementation

@override
toJSON() {
  var data = super.toJSON();

  data["points"] = [];

  for (var i = 0, l = points.length; i < l; i++) {
    var point = points[i];
    data["points"].add(point.toArray());
  }

  return data;
}