toJson method

Map<String, dynamic> toJson()

Allows you to serialize object.

Implementation

Map<String, dynamic> toJson() {
  Map<String, dynamic> result = {};

  result["x"] = x;
  result["y"] = y;

  return result;
}