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:
autoHideDockandhideDockare mutually exclusive: You may specify one or the other, but not both.autoHideMenuBarandhideMenuBarare 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 eitherhideDockorautoHideDock. - If you specify any of
disableProcessSwitching,disableForceQuit,disableSessionTermination, ordisableMenuBarTransparency, it must be accompanied by eitherhideDockorautoHideDock. autoHideToolbarmay be used only when bothfullScreenandautoHideMenuBarare 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);
}
}