StepScreenshotOptions class
Screenshot timing/quality flags for a StepReportCapturePolicy.
The runner applies these to its screenshot pipeline; captureStepReportArtifacts only enforces the shot→observe pairing invariant.
Constructors
- StepScreenshotOptions({bool pumpBeforeCapture = false, bool ensureTargetVisible = true, bool waitForTarget = false, bool waitForLottie = true, bool stabilize = true, bool forFailure = false, bool requireVisibleActionHighlight = false, bool allowObserveWhileQueueBusy = false, ObservationDetailLevel observationDetail = ObservationDetailLevel.standard})
-
const
- StepScreenshotOptions.afterCondition(TestStep step)
-
After expect/wait (post-step fallback).
factory
- StepScreenshotOptions.beforeAction({bool requireVisibleActionHighlight = false, bool targetAlreadyResolved = false})
-
Before tap/toggle/etc.: wait for paint, short settle when the executor
has not already resolved the target. A resolved tap is captured at the
executor boundary without advancing another frame, so the evidence stays
on the pre-action screen and avoids a redundant stability pump.
factory
- StepScreenshotOptions.matchedCondition()
-
A matched condition already advanced Flutter to the satisfying state.
Freeze that frame before a scheduled callback replaces it.
factory
- StepScreenshotOptions.onFailure()
-
Failure freeze: no pumps that advance the tree.
factory
-
Mid-wait navigation: runner uses a dedicated paint/early-frame path;
these flags apply when falling through to the normal screenshot helper.
factory
- StepScreenshotOptions.waitForTextMatched()
-
Mid-wait text match: paint the highlight target, no long settle.
factory
Properties
- allowObserveWhileQueueBusy → bool
-
Report Observer uses captureDiagnosticUiSnapshot (no queue). Mid-wait
hooks hold the leaf queue — allow observe so overlays match the mid-wait
PNG instead of the next screen after
executereturns.final - ensureTargetVisible → bool
-
final
- forFailure → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- observationDetail → ObservationDetailLevel
-
Detail required for the Observer evidence paired with this frame.
final
- pumpBeforeCapture → bool
-
final
- requireVisibleActionHighlight → bool
-
Drop the frame when an action highlight lands on flat empty pixels.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stabilize → bool
-
final
- waitForLottie → bool
-
final
- waitForTarget → bool
-
final
Methods
-
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