toJson method

Map toJson()

Implementation

Map toJson() {
  Map _result = {};

  if (x != null) _result.addAll({"x": x});
  if (y != null) _result.addAll({"y": y});

  return _result;
}