toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'x': x,
      'y': y,
      if (name != null) 'name': name,
      if (color != null) 'color': color,
      if (custom != null) 'custom': custom,
    };