fromJson static method
Implementation
static Chat fromJson(Map<String, dynamic> json) {
return Chat(
id: json['id']!,
type: json['type']!,
title: json['title'],
username: json['username'],
firstName: json['first_name'],
lastName: json['last_name'],
photo: callIfNotNull(ChatPhoto.fromJson, json['photo']),
bio: json['bio'],
description: json['description'],
inviteLink: json['invite_link'],
pinnedMessage: callIfNotNull(Message.fromJson, json['pinned_message']),
permissions: callIfNotNull(ChatPermissions.fromJson, json['permissions']),
slowModeDelay: json['slow_mode_delay'],
stickerSetName: json['sticker_set_name'],
canSetStickerSet: json['can_set_sticker_set'],
linkedChatId: json['linked_chat_id'],
messageAutoDeleteTime: json['message_auto_delete_time'],
location: callIfNotNull(
ChatLocation.fromJson,
json['location'],
),
);
}