toJson method

Map<String, dynamic> toJson()

Converts to JSON.

Implementation

Map<String, dynamic> toJson() => {
  if (text != null) 'text': text!.toJson(),
  if (audio != null) 'audio': audio!.toJson(),
  if (image != null) 'image': image!.toJson(),
};