toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts an object to JSON.

Implementation

@override
Map<String, dynamic> toJson() {
  final returnValue = <String, dynamic>{
    "\$": "0x0f2bcb6f",
    "flags": flags,
    "canViewParticipants": canViewParticipants,
    "canSetUsername": canSetUsername,
    "canSetStickers": canSetStickers,
    "hiddenPrehistory": hiddenPrehistory,
    "canSetLocation": canSetLocation,
    "hasScheduled": hasScheduled,
    "canViewStats": canViewStats,
    "blocked": blocked,
    "flags2": flags2,
    "canDeleteChannel": canDeleteChannel,
    "antispam": antispam,
    "participantsHidden": participantsHidden,
    "translationsDisabled": translationsDisabled,
    "storiesPinnedAvailable": storiesPinnedAvailable,
    "viewForumAsMessages": viewForumAsMessages,
    "id": id,
    "about": about,
    "participantsCount": participantsCount,
    "adminsCount": adminsCount,
    "kickedCount": kickedCount,
    "bannedCount": bannedCount,
    "onlineCount": onlineCount,
    "readInboxMaxId": readInboxMaxId,
    "readOutboxMaxId": readOutboxMaxId,
    "unreadCount": unreadCount,
    "chatPhoto": chatPhoto,
    "notifySettings": notifySettings,
    "exportedInvite": exportedInvite,
    "botInfo": botInfo,
    "migratedFromChatId": migratedFromChatId,
    "migratedFromMaxId": migratedFromMaxId,
    "pinnedMsgId": pinnedMsgId,
    "stickerset": stickerset,
    "availableMinId": availableMinId,
    "folderId": folderId,
    "linkedChatId": linkedChatId,
    "location": location,
    "slowmodeSeconds": slowmodeSeconds,
    "slowmodeNextSendDate": slowmodeNextSendDate?.toIso8601String(),
    "statsDc": statsDc,
    "pts": pts,
    "call": call,
    "ttlPeriod": ttlPeriod,
    "pendingSuggestions": pendingSuggestions,
    "groupcallDefaultJoinAs": groupcallDefaultJoinAs,
    "themeEmoticon": themeEmoticon,
    "requestsPending": requestsPending,
    "recentRequesters": recentRequesters,
    "defaultSendAs": defaultSendAs,
    "availableReactions": availableReactions,
    "stories": stories,
    "wallpaper": wallpaper,
  };

  // Finished toJson.
  return returnValue;
}