DesignCursorCheck class

Whether every control on a screen shows a pointer that says it acts: over its whole hit area while it is live, and nothing of its own while it is off.

A mouse over a live control shows the click cursor, as Flutter's own buttons, sliders and switches do on the web and on a desktop, or a cursor of its own that says more (a text field's text cursor, a drag handle's grab, a divider's resize, a colour area's crosshair). A slider that shows the click cursor over its thumb but the arrow over its track reads as a picture of a slider: the user found it on Frosted's and Ledger's 0.1.0. An off control defers to what is under it: the click cursor over a disabled button promises a press that never comes.

Each control (a box whose semantics say it is a button, a link, a field, a slider, a switch or a checkbox, or that takes a tap) is read at a grid of spots across its box, as the mouse tracker picks the cursor there: the first mouse region under the pointer that does not defer. A spot where nothing acts (no gesture and no text entry is hit there) is not where the control is (the tap-target check, DesignTapTargetCheck, reads those), and a spot inside a smaller control within it is that control's. A cursor given as Flutter's adaptive clickable cursor (what Material's ink asks for) shows the click cursor on the web, where the galleries run, and counts as the click cursor here unless web is false.

A test pumps a screen (a gallery page at 1440 wide, an app screen), then:

const DesignCursorCheck(look: 'Comic')
    .check(tester.element(find.byType(SettingsScreen)))
    .verify();
Annotations

Constructors

DesignCursorCheck({required String look, bool web = true})
A check for look.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
look → String
The look's name, for messages.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
web → bool
Whether Flutter's adaptive clickable cursor counts as the click cursor, as it shows on the web.
final

Methods

check(BuildContext context) → DesignAlignmentReport
Checks every control under context that is laid out and painted.
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