UserFullInfo.fromJson constructor

UserFullInfo.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

factory UserFullInfo.fromJson(Map<String, dynamic> json) => UserFullInfo(
      personalPhoto: json['personal_photo'] == null
          ? null
          : ChatPhoto.fromJson(json['personal_photo']),
      photo: json['photo'] == null ? null : ChatPhoto.fromJson(json['photo']),
      publicPhoto: json['public_photo'] == null
          ? null
          : ChatPhoto.fromJson(json['public_photo']),
      isBlocked: json['is_blocked'],
      canBeCalled: json['can_be_called'],
      supportsVideoCalls: json['supports_video_calls'],
      hasPrivateCalls: json['has_private_calls'],
      hasPrivateForwards: json['has_private_forwards'],
      hasRestrictedVoiceAndVideoNoteMessages:
          json['has_restricted_voice_and_video_note_messages'],
      hasPinnedStories: json['has_pinned_stories'],
      needPhoneNumberPrivacyException:
          json['need_phone_number_privacy_exception'],
      bio: json['bio'] == null ? null : FormattedText.fromJson(json['bio']),
      premiumGiftOptions: List<PremiumPaymentOption>.from(
          (json['premium_gift_options'] ?? [])
              .map((item) => PremiumPaymentOption.fromJson(item))
              .toList()),
      groupInCommonCount: json['group_in_common_count'],
      botInfo: json['bot_info'] == null
          ? null
          : BotInfo.fromJson(json['bot_info']),
      extra: json['@extra'],
      clientId: json['@client_id'],
    );