toggleFullscreen method
Toggles fullscreen of the application on and off.
Implementation
Future<void> toggleFullscreen() async {
Log.debug('toggleFullscreen()', '$runtimeType');
if (_fullscreenMutex.isLocked) {
return;
}
await _fullscreenMutex.protect(() async {
if (_isFullscreen) {
await PlatformUtils.exitFullscreen();
} else {
await PlatformUtils.enterFullscreen();
}
_isFullscreen = !_isFullscreen;
});
}