CursorTheme class
Theme configuration for mouse cursors in the node flow editor.
Defines cursor styles for different interaction contexts:
- Default canvas cursor (idle state)
- Cursor when drawing a selection rectangle
- Cursor when dragging nodes or panning
- Cursor when hovering over nodes or connections
- Cursor when hovering over ports
Example:
final customCursorTheme = CursorTheme.light.copyWith(
canvasCursor: SystemMouseCursors.basic,
dragCursor: SystemMouseCursors.grabbing,
);
- Available extensions
Constructors
- CursorTheme({required SystemMouseCursor canvasCursor, required SystemMouseCursor selectionCursor, required SystemMouseCursor dragCursor, required SystemMouseCursor nodeCursor, required SystemMouseCursor portCursor})
-
const
Properties
- canvasCursor → SystemMouseCursor
-
Default mouse cursor when hovering over empty canvas areas.
final
- dragCursor → SystemMouseCursor
-
Mouse cursor when dragging nodes or panning the canvas.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- nodeCursor → SystemMouseCursor
-
Mouse cursor when hovering over nodes or connections.
final
- portCursor → SystemMouseCursor
-
Mouse cursor when hovering over ports or creating connections.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionCursor → SystemMouseCursor
-
Mouse cursor when drawing a selection rectangle.
final
Methods
-
copyWith(
{SystemMouseCursor? canvasCursor, SystemMouseCursor? selectionCursor, SystemMouseCursor? dragCursor, SystemMouseCursor? nodeCursor, SystemMouseCursor? portCursor}) → CursorTheme - Creates a copy of this theme with the given fields replaced.
-
cursorFor(
ElementType elementType, InteractionState interaction, {bool isInteractive = true}) → SystemMouseCursor -
Available on CursorTheme, provided by the CursorThemeExtension extension
Returns the appropriate cursor for the given element type and interaction state. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- dark → const CursorTheme
- Dark theme cursor configuration.
- light → const CursorTheme
- Light theme cursor configuration.