applyAsFullScreenPresentationOptions method
Applies these NSAppPresentationOptions to as fullscreen presentation options.
These NSAppPresentationOptions must include NSAppPresentationOption.fullScreen.
Throws an assertion error if any of the following restrictions is violated:
autoHideDock
andhideDock
are mutually exclusive: You may specify one or the other, but not both.autoHideMenuBar
andhideMenuBar
are mutually exclusive: You may specify one or the other, but not both.- If you specify
hideMenuBar
, it must be accompanied byhideDock
. - If you specify
autoHideMenuBar
, it must be accompanied by eitherhideDock
orautoHideDock
. - If you specify any of
disableProcessSwitching
,disableForceQuit
,disableSessionTermination
, ordisableMenuBarTransparency
, it must be accompanied by eitherhideDock
orautoHideDock
. autoHideToolbar
may be used only when bothfullScreen
andautoHideMenuBar
are also set.
If the force
flag is true, those assertions are disabled.
Implementation
void applyAsFullScreenPresentationOptions({bool force = false}) {
if (!force) {
assertRestrictions();
assert(contains(NSAppPresentationOption.fullScreen),
'fullScreen must be set.');
}
WindowManipulator.removeFullScreenPresentationOptions();
for (final option in options) {
WindowManipulator.addFullScreenPresentationOption(option);
}
}