toggleMic method

Future<void> toggleMic()

Implementation

Future<void> toggleMic() async {
  _isMicEnabled = !_isMicEnabled;
  await _engine?.muteLocalAudioStream(!_isMicEnabled);

  final local = _participants[_localUid];
  if (local != null) {
    _participants[_localUid] = local.copyWith(isMuted: !_isMicEnabled);
  }
  notifyListeners();
}