toJson method

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

Implementation

@override
Map<String, dynamic> toJson([dynamic extra]) {
  return {
    "@type": CONSTRUCTOR,
    "personal_photo": personalPhoto?.toJson(),
    "photo": photo?.toJson(),
    "public_photo": publicPhoto?.toJson(),
    "is_blocked": isBlocked,
    "can_be_called": canBeCalled,
    "supports_video_calls": supportsVideoCalls,
    "has_private_calls": hasPrivateCalls,
    "has_private_forwards": hasPrivateForwards,
    "has_restricted_voice_and_video_note_messages":
        hasRestrictedVoiceAndVideoNoteMessages,
    "has_pinned_stories": hasPinnedStories,
    "need_phone_number_privacy_exception": needPhoneNumberPrivacyException,
    "bio": bio?.toJson(),
    "premium_gift_options":
        premiumGiftOptions.map((i) => i.toJson()).toList(),
    "group_in_common_count": groupInCommonCount,
    "bot_info": botInfo?.toJson(),
  };
}