toJson method

Map toJson()

Creates a json from the object

Implementation

Map 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,
  }..removeWhere((_, v) => v == null);
}