toggleFullscreen method Null safety

dynamic toggleFullscreen(
  1. {bool fullscreen = true}
)

Implementation

toggleFullscreen({bool fullscreen = true}) {
  if (fullscreen)
    SystemChrome.setEnabledSystemUIOverlays([]);
  else
    SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
}