updateParticipantLanguage method
void
updateParticipantLanguage(
- LanguageModel transcriptionLanguage
)
Implementation
void updateParticipantLanguage(LanguageModel transcriptionLanguage) {
// Lock immediately (optimistic) so the UI reflects the one-time limit
// regardless of whether the API succeeds or fails.
_hasUsedParticipantLanguage = true;
notifyListeners();
final body = {
"meeting_uid": meetingDetails.meetingUid,
"language_code": transcriptionLanguage.code,
};
networkRequestHandler(
apiCall: () => apiClient.updateTranscriptionLanguage(meetingDetails.authorizationToken, selfIdentity, body),
onSuccess: (data) {
transcriptionLanguageData = TranscriptionActionModel(
showIcon: _transcriptionLanguageData?.showIcon ?? true,
isLanguageSelected: true,
langCode: transcriptionLanguage.code,
sourceLang: transcriptionLanguage.code,
);
}
);
}