User.fromJson constructor
Creates a User object from JSON object
Implementation
factory User.fromJson(Map<String, dynamic> json) {
return User(
id: json['id'],
isBot: json['is_bot'],
firstName: json['first_name'],
lastName: json['last_name'],
username: json['username'],
languageCode: json['language_code'],
isPremium: json['is_premium'],
addedToAttachmentMenu: json['added_to_attachment_menu'],
canJoinGroups: json['can_join_groups'],
canReadAllGroupMessages: json['can_read_all_group_messages'],
supportsInlineQueries: json['supports_inline_queries'],
canConnectToBusiness: json['can_connect_to_business'],
hasMainWebApp: json['has_main_web_app'],
);
}