native_mouse_cursor
library
Classes
-
NativeCursorShadow
-
A drop shadow baked behind a cursor glyph.
-
NativeMouseCursor
-
A real OS mouse cursor built from your own glyph.
-
NativeMouseCursorOverlay
-
Wrap your app with this to make NativeMouseCursors work on platforms that
have no native custom-cursor API — iOS/iPadOS and Android below API 24 —
by painting the same baked bitmap in a Flutter overlay that follows the
pointer, while suppressing the system pointer so there's no double cursor.
Mixins
-
NativeMouseCursorMixin<T extends StatefulWidget>
-
Mix into a State to keep NativeMouseCursor configured automatically: in
didChangeDependencies it points the cache at the context's
devicePixelRatio (re-baking on a DPR change) and rebuilds the widget when a
freshly-baked cursor lands. With it, you can call
NativeMouseCursor.svg /
get straight from build() — no manual configure/setState wiring.
Typedefs
-
CursorPainter
= void Function(Canvas canvas, Size size)
-
Paints a cursor glyph into a
size-logical box (top-left origin). The cache
applies DPR scaling, rotation and the baked shadow around this callback.