toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  final json = <String, dynamic>{
    'type': 'text',
    'text': text,
  };
  if (annotations != null) json['annotations'] = annotations!;
  return json;
}