toJson method
Converts a User object to JSON object
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'is_bot': isBot,
'first_name': firstName,
'last_name': lastName,
'username': username,
'language_code': languageCode,
'is_premium': isPremium,
'added_to_attachment_menu': addedToAttachmentMenu,
'can_join_groups': canJoinGroups,
'can_read_all_group_messages': canReadAllGroupMessages,
'supports_inline_queries': supportsInlineQueries,
'can_connect_to_business': canConnectToBusiness,
'has_main_web_app': hasMainWebApp,
}..removeWhere(_nullFilter);
}