mouseCursor property

WidgetStateProperty<MouseCursor?>? mouseCursor
final

The cursor for a mouse pointer when it enters or is hovering over the scrollbar's thumb or track.

Resolves in the following WidgetStates:

The WidgetState.hovered state is resolved when the pointer is over the painted scrollbar track or thumb (using the same hit test area as hover interactions). The WidgetState.dragged state is resolved while the scrollbar thumb is being dragged. The WidgetState.disabled state is resolved when the scrollbar is not interactive; a non-interactive scrollbar does not track pointer hovering, so ancestor cursors are preserved over it.

The cursor is applied while the pointer is over the painted scrollbar and while the scrollbar thumb is being dragged, so the dragged cursor (typically SystemMouseCursors.grabbing) remains stable even if the pointer moves outside the scrollbar during a drag. When neither condition holds, cursor resolution is deferred to ancestors, so a parent widget's cursor (for example, the I-beam cursor of an enclosing EditableText) is preserved.

When this is null, or when its resolved value is null, MouseCursor.defer is used and ancestor cursors are left unchanged.

Implementation

final WidgetStateProperty<MouseCursor?>? mouseCursor;