toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final data = <String, dynamic>{};
  data['type'] = type;
  if (text != null) {
    data['text'] = text!.toJson();
  }
  data['annotations'] = annotations.toJson();
  data['plain_text'] = plainText;
  data['href'] = href;
  if (equation != null) {
    data['equation'] = equation!.toJson();
  }
  if (mention != null) {
    data['mention'] = mention!.toJson();
  }
  return data;
}