toJson method

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

Serializes to a JSON map with a type discriminator (pi shape).

Implementation

@override
Map<String, dynamic> toJson() => {
  'type': 'text',
  'text': text,
  if (textSignature != null) 'textSignature': textSignature,
};