toggleMute method Null safety
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);
}