Map<String, dynamic> toJson() { return { 'label': label.name, if (customLabel != null) 'customLabel': customLabel, }; }