toggleMute method Null safety

void toggleMute()

Function to mute/unmute the microphone

Implementation

void toggleMute() async {
  var status = await Permission.microphone.status;
  if (value.isLocalUserMuted && status.isDenied) {
    await Permission.microphone.request();
  }
  value = value.copyWith(isLocalUserMuted: !(value.isLocalUserMuted));
  value.engine?.muteLocalAudioStream(value.isLocalUserMuted);
}