setVisibleOnAllWorkspaces method

Future<void> setVisibleOnAllWorkspaces(
  1. bool visible, {
  2. bool? visibleOnFullScreen,
})

Sets whether the window should be visible on all workspaces.

Note: If you need to support dragging a window on top of a fullscreen window on another screen, you need to modify MainFlutterWindow to inherit from NSPanel

class MainFlutterWindow: NSPanel {
    // ...
}

@platforms macos

Implementation

Future<void> setVisibleOnAllWorkspaces(
  bool visible, {
  bool? visibleOnFullScreen,
}) async {
  final Map<String, dynamic> arguments = {
    'visible': visible,
    'visibleOnFullScreen': visibleOnFullScreen ?? false,
  };
  await _channel.invokeMethod('setVisibleOnAllWorkspaces', arguments);
}