toJson method

Object toJson()

Converts this object to something serializable in JSON.

Implementation

Object toJson() {
  return <String, int>{
    'x': x,
    'y': y,
  };
}