TestAction class

Class to perform a certain ActionType on the WidgetTester

Constructors

TestAction({required TestActionType action, WidgetTester? tester, Finder? finder, String? enterText, Duration? awaitDuration, Function? customAction, bool executePumpAndSettle = true, int pumpTime = 5, Offset? dragOffset})

Properties

action TestActionType
Type of the action to be performed on the Finder widget.
final
awaitDuration Duration?
Needed when TestActionType == AwaitFuture
final
customAction Function?
Needed when TestActionType == CustomAction
final
dragOffset Offset?
The Offset used to drag a Widget using the Finder
final
enterText String?
Needed when TestActionType == EnterText.
final
executePumpAndSettle bool
Defaults to true, controls the execution of the WidgetTester.pumpAndSettle at the end of the action.
final
finder Finder?
Needed when TestActionType != PumpAndSettle.
final
hashCode int
The hash code for this object.
no setterinherited
pumpTime int
How many times the pump should be called.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tester WidgetTester?
Only needed if the tester is not set in the TestActions class or is executed outside the cited class.
final

Methods

copyWith({TestActionType? actionType, WidgetTester? tester, Finder? finder, String? enterText, Duration? awaitFuture, Function? customAction, bool? executePumpAndSettle, Offset? dragOffset, int? pumpTime}) TestAction
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performAction({Function? setAsDone, int? actionIndex}) Future<void>
Performs the action
printError(dynamic e, int actionIndex, {String? surplusMessage}) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited