getParticipantConsentList method

void getParticipantConsentList({
  1. VoidCallback? onLoaded,
})

Implementation

void getParticipantConsentList({VoidCallback? onLoaded}) {
  networkListRequestHandler(
      apiCall: () => apiClient.getParticipantConsentList(
          meetingDetails.meetingUid, getSessionId() ?? ""),
      onSuccess: (data) {
        if (data != null) {
          final localList = ConsentParticipant.fromRemoteList(data);
          participantListForConsent = localList;

          if (onLoaded != null) {
            onLoaded.call(); // <-- Trigger callback after loading list
            return;
          }
          sendAction(ActionModel(
            action: MeetingActions.startedRecordingConsent,
            participants: localList,
          ));
        }
      });
}