toJson method

Map<String, dynamic> toJson()

Converts to JSON.

Implementation

Map<String, dynamic> toJson() => {
  'type': type,
  if (lastMessages != null) 'last_messages': lastMessages,
};