toggleCamera method Null safety

void toggleCamera()

Function to toggle enable/disable the camera

Implementation

void toggleCamera() async {
  var status = await Permission.camera.status;
  if (value.isLocalVideoDisabled && status.isDenied) {
    await Permission.camera.request();
  }
  value = value.copyWith(isLocalVideoDisabled: !(value.isLocalVideoDisabled));
  value.engine?.muteLocalVideoStream(value.isLocalVideoDisabled);
}