UserFullInfo.fromJson constructor
Parses a UserFullInfo from TDLib JSON.
Implementation
factory UserFullInfo.fromJson(Map<String, dynamic> json) => UserFullInfo(
personalPhoto: _readOptional(json['personal_photo'], ChatPhoto.fromJson),
photo: _readOptional(json['photo'], ChatPhoto.fromJson),
publicPhoto: _readOptional(json['public_photo'], ChatPhoto.fromJson),
communityId: _readInt(json['community_id']),
blockList: _readOptional(json['block_list'], BlockList.fromJson),
canBeCalled: _readBool(json['can_be_called']),
supportsVideoCalls: _readBool(json['supports_video_calls']),
hasPrivateCalls: _readBool(json['has_private_calls']),
hasPrivateForwards: _readBool(json['has_private_forwards']),
hasRestrictedVoiceAndVideoNoteMessages: _readBool(
json['has_restricted_voice_and_video_note_messages'],
),
hasPostedToProfileStories: _readBool(json['has_posted_to_profile_stories']),
hasSponsoredMessagesEnabled: _readBool(
json['has_sponsored_messages_enabled'],
),
needPhoneNumberPrivacyException: _readBool(
json['need_phone_number_privacy_exception'],
),
setChatBackground: _readBool(json['set_chat_background']),
usesUnofficialApp: _readBool(json['uses_unofficial_app']),
bio: _readOptional(json['bio'], FormattedText.fromJson),
birthdate: _readOptional(json['birthdate'], Birthdate.fromJson),
personalChatId: _readInt(json['personal_chat_id']),
giftCount: _readInt(json['gift_count']),
groupInCommonCount: _readInt(json['group_in_common_count']),
incomingPaidMessageStarCount: _readInt(
json['incoming_paid_message_star_count'],
),
outgoingPaidMessageStarCount: _readInt(
json['outgoing_paid_message_star_count'],
),
giftSettings: _readObject(json['gift_settings'], GiftSettings.fromJson),
botVerification: _readOptional(
json['bot_verification'],
BotVerification.fromJson,
),
mainProfileTab: _readOptional(
json['main_profile_tab'],
ProfileTab.fromJson,
),
firstProfileAudio: _readOptional(
json['first_profile_audio'],
Audio.fromJson,
),
rating: _readOptional(json['rating'], UserRating.fromJson),
pendingRating: _readOptional(json['pending_rating'], UserRating.fromJson),
pendingRatingDate: _readInt(json['pending_rating_date']),
note: _readOptional(json['note'], FormattedText.fromJson),
tonWalletCard: _readOptional(
json['ton_wallet_card'],
TonWalletCard.fromJson,
),
shareTheme: _readOptional(json['share_theme'], ProfileShareTheme.fromJson),
businessInfo: _readOptional(json['business_info'], BusinessInfo.fromJson),
botInfo: _readOptional(json['bot_info'], BotInfo.fromJson),
extra: json['@extra'],
clientId: _readClientId(json['@client_id']),
);