Drive class
The live half of the verb engine: scenarios' vocabulary — same targets,
same actionability ladder, same refusal wording — executed against a
running app's real WidgetsBinding.
The one behavioral difference from a scenario is time. A scenario's screen
is settled by construction when a verb runs; a live screen is mid-flight —
a route transition holds an IgnorePointer up and both pages are briefly
in the tree — so every refusal here is treated as possibly transient:
resolve + reachability retry until actTimeout, settling between attempts
(a plain wait advances zero frames on a hidden window), and only the
deadline surfaces the error. Measured: taps land on the first frame a
transition releases them.
Where it runs is a DriveLane. The default is the live one; a
TesterLane runs the same verbs under a widget test's fake clock, which is
how a preview reaches a state before it is photographed.
Constructors
- Drive({WidgetsBinding? binding})
- Drive.on(DriveLane lane)
Properties
- actTimeout ↔ Duration
-
Deadline for the resolve/reachability retry ladder.
getter/setter pair
- controller → WidgetController
-
final
- doubleTapGap ↔ Duration
-
Default gap between doubleTap's two taps — real elapsed time, and the
one thing about that verb that is not free to be zero.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hoverHold ↔ Duration
-
Default hold for hover and unhover — real elapsed time, not a settle.
getter/setter pair
- hovering → String?
-
What the synthetic mouse is parked over, or null when it is off screen.
no setter
- lane → DriveLane
-
final
- retryPump ↔ Duration
-
Settle budget between retry attempts.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settleBudget ↔ Duration
-
Default settle budget after an act.
getter/setter pair
Methods
-
back(
{Duration? settle}) → Future< DriveStep> -
The platform back gesture, injected the way the engine injects it — down
flutter/navigation— soPopScopes run on the way in. -
dispose(
) → void -
Lets go of what a verb took hold of for the rest of the drive's life —
the semantics tree a
{"label"}target turned on. -
doubleTap(
dynamic target, {Duration? gap, Duration? settle}) → Future< DriveStep> - Two taps in the same place, close enough together to read as one gesture.
-
drag(
dynamic target, Offset by, {Duration? settle}) → Future< DriveStep> -
enterText(
dynamic target, String text, {Duration? settle}) → Future< DriveStep> -
Focuses the field at
targetand setstextas one editing value, the way a widget reports an edit the user made. -
hover(
dynamic target, {Duration? hold, Duration? settle}) → Future< DriveStep> -
Parks a mouse over
targetand holds it there, so whatever the app only shows to a mouse has time to appear. -
key(
String chord, {Duration? settle}) → Future< DriveStep> -
One keystroke —
escape,enter,meta+k,shift+tab. -
longPress(
dynamic target, {Duration? settle}) → Future< DriveStep> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
observe(
{Duration? settle}) → Future< DriveStep> - The act-less transaction: settle and look.
-
scroll(
dynamic target, Offset by, {Duration? settle}) → Future< DriveStep> -
Turns the mouse wheel over
target. -
scrollTo(
dynamic target, {dynamic within, double step = 200, int maxScrolls = 50, Duration? settle}) → Future< DriveStep> -
Scrolls until
targetis on screen. Same contract as the scenario verb: the target may match nothing yet — being off screen is the reason to call it — and a target already on screen is a no-op, whether or not anything scrolls. -
secondaryTap(
dynamic target, {Duration? settle}) → Future< DriveStep> - A right-click — the mouse's other button, and the way a context menu is asked for on every desktop.
-
tap(
dynamic target, {Duration? settle}) → Future< DriveStep> -
toString(
) → String -
A string representation of this object.
inherited
-
unhover(
{Duration? hold, Duration? settle}) → Future< DriveStep> - Takes the synthetic mouse off the screen, so everything it was hovering gets its exit.
-
visibleTexts(
) → List< String> -
wait(
Duration duration, {Duration? settle}) → Future< DriveStep> -
durationof the lane's clock, then a settle so what the wait released is applied.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited