toJson method
Implementation
Map<String, Object?> toJson() => <String, Object?>{
'type': type.name,
if (plane != null) 'plane': plane!.name,
if (marker != null) 'marker': marker,
if (hand != null) 'hand': hand!.name,
if (id != null) 'id': id,
};