setCursor method

void setCursor(
  1. MouseCursor cursor
)

Updates the mouse cursor and triggers a rebuild of the cursor. This does not rebuild the child widget, making it efficient for dynamic cursor changes.

cursor - The new mouse cursor.

Implementation

void setCursor(MouseCursor cursor) {
  setState(() {
    currentCursor = cursor;
  });
}