toJson method

Map<String, dynamic> toJson()

Converts a Chat object to JSON.

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'type': type.value,
    'title': title,
    'username': username,
    'first_name': firstName,
    'last_name': lastName,
    'is_forum': isForum,
  };
}