toJson method

Map<String, dynamic> toJson()

Returns this instance as a json.

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{}
    ..['id'] = id
    ..['x'] = x
    ..['y'] = y
    ..['w'] = w
    ..['h'] = h;

  return json;
}