GroupCall.fromJson constructor

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

Parses a GroupCall from TDLib JSON.

Implementation

factory GroupCall.fromJson(Map<String, dynamic> json) => GroupCall(
      id: _readInt(json['id']),
      title: _readString(json['title']),
      scheduledStartDate: _readInt(json['scheduled_start_date']),
      enabledStartNotification: _readBool(json['enabled_start_notification']),
      isActive: _readBool(json['is_active']),
      isRtmpStream: _readBool(json['is_rtmp_stream']),
      isJoined: _readBool(json['is_joined']),
      needRejoin: _readBool(json['need_rejoin']),
      canBeManaged: _readBool(json['can_be_managed']),
      participantCount: _readInt(json['participant_count']),
      hasHiddenListeners: _readBool(json['has_hidden_listeners']),
      loadedAllParticipants: _readBool(json['loaded_all_participants']),
      recentSpeakers: _readList<GroupCallRecentSpeaker>(
          json['recent_speakers'],
          (e) => _readObject(e, GroupCallRecentSpeaker.fromJson)),
      isMyVideoEnabled: _readBool(json['is_my_video_enabled']),
      isMyVideoPaused: _readBool(json['is_my_video_paused']),
      canEnableVideo: _readBool(json['can_enable_video']),
      muteNewParticipants: _readBool(json['mute_new_participants']),
      canToggleMuteNewParticipants:
          _readBool(json['can_toggle_mute_new_participants']),
      recordDuration: _readInt(json['record_duration']),
      isVideoRecorded: _readBool(json['is_video_recorded']),
      duration: _readInt(json['duration']),
      extra: json['@extra'],
      clientId: _readClientId(json['@client_id']),
    );