toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => {
  'label': label,
  if (detail != null) 'detail': detail,
  if (tone != Tone.neutral) 'tone': tone.name,
  if (address != null) 'address': address!.toString(),
};