toJson method

Map<String, dynamic> toJson()

Converts the message to a JSON-compatible map.

Implementation

Map<String, dynamic> toJson() => {
  'id': id,
  'from': from,
  'parts': parts.map((e) => e.toJson()).toList(),
  'sessionId': sessionId,
};