MethodChannelNativeMouseCursor class

Method-channel implementation (macOS / Linux / Windows native hosts).

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createCursor({required String key, required Uint8List pngBytes, required int width, required int height, required int hotX, required int hotY, required double devicePixelRatio}) Future<void>
Register a cursor bitmap (pngBytes, width×height device pixels) under key, with hotspot hotX/hotY (device pixels) and source devicePixelRatio so the OS sizes it in logical points.
override
createCursorWeb({required String key, required Uint8List lo, required Uint8List hi, required double density, required int hotX, required int hotY}) Future<void>
Web only: register a cursor from a low-res (lo, 1×, CSS-sized) and a high-res (hi) PNG so HiDPI browsers render it crisply via CSS image-set. density is the high-res bitmap's resolution multiplier; hotX/hotY are in CSS pixels. A no-op off the web.
inherited
deleteCursor(String key) Future<void>
Forget the cursor registered under key.
override
isSupported() Future<bool>
Whether this host can show a true native OS cursor. Hosts without one (iOS/iPadOS, Android below API 24) return false. Defaults to true.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetCursor() Future<void>
Clear any cursor this backend has applied, returning to the default. Used on web (where the cursor is a CSS property we own) when a cursor session ends, so nothing lingers; a no-op on native hosts (the OS manages it).
inherited
setCursor(String key) Future<void>
Make the cursor registered under key the active OS cursor.
override
setPointerHidden(bool hidden) Future<void>
Hide/show the system pointer, used by NativeMouseCursorOverlay so the painted cursor replaces it instead of doubling it. Implemented on Android (a null PointerIcon); a no-op elsewhere (web/desktop hide via Flutter's own SystemMouseCursors.none). Defaults to a no-op.
override
toString() String
A string representation of this object.
inherited

Operators

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