toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'points': points.map((e) => e.toJson()).toList(),
    'holes': holes.map((e) => e.map((e) => e.toJson()).toList()).toList(),
    'fillColor': fillColor?.toHex(),
    'strokeColor': strokeColor?.toHex(),
    'alpha': alpha,
  };
}