ScreenClient class

Client for ScreenService.

Handles multi-monitor support.

Inheritance

Constructors

ScreenClient(NativeBridge bridge)

Properties

bridge NativeBridge
Protected access to bridge for subclasses that need direct bridge access.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceName String
The service name (must match native side).
no setteroverride

Methods

dispose() → void
Clean up all subscriptions.
inherited
getActiveAppBounds() Future<ActiveAppInfo?>
Get bounds of the currently active (frontmost) application window.
getCurrentScreen(String id) Future<ScreenInfo?>
Get full screen info for the screen a window is currently on.
getCursorPosition() Future<Offset>
Get cursor position.
getCursorScreen() Future<int>
Get the screen the cursor is on.
getScreens() Future<List<ScreenInfo>>
Get all available screens.
getWindowScreen(String id) Future<int>
Get the screen a window is on.
moveToScreen(String id, int screenIndex, {bool animate = false, int? durationMs}) Future<void>
Move window to a specific screen.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onEvent(String eventName, void callback(NativeEvent)) → void
Subscribe to events from this service.
inherited
onScreensChanged(void callback(List<ScreenInfo> screens)) → void
Called when screen configuration changes.
onWindowEvent(String windowId, String eventName, void callback(NativeEvent)) → void
Subscribe to events for a specific window.
inherited
onWindowScreenChanged(String id, void callback(int screenIndex)) → void
Called when a window moves to a different screen.
send<T>(String command, {String? windowId, Map<String, dynamic>? params}) Future<T?>
Send a command to this service.
inherited
sendFireAndForget(String command, {String? windowId, Map<String, dynamic>? params}) → void
Send a command, fire and forget.
inherited
sendForMap(String command, {String? windowId, Map<String, dynamic>? params}) Future<Map<String, dynamic>?>
Send a command expecting a Map result.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited