setToolbarStyle static method

Future<void> setToolbarStyle({
  1. required NSWindowToolbarStyle toolbarStyle,
})

Sets the window's toolbar style.

For this method to have an effect, the window needs to have had a toolbar added with the addToolbar method beforehand.

Usage example:

WindowManipulator.addToolbar();
WindowManipulator.setToolbarStyle(NSWindowToolbarStyle.unified);

Implementation

static Future<void> setToolbarStyle(
    {required NSWindowToolbarStyle toolbarStyle}) async {
  await _completer.future;
  await _windowManipulatorMethodChannel.invokeMethod('setToolbarStyle', {
    'toolbarStyle': toolbarStyle.name,
  });
}