TestAction class

Class to perform a certain ActionType on the WidgetTester

Constructors

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

Properties

actionName String?
The name of this action
final
actionType ActionType
Type of the action to be performed on the Finder widget.
final
awaitDuration Duration?
Needed when ActionType == AwaitFuture
final
customAction Function?
Needed when ActionType == CustomAction
final
dragOffset Offset?
The Offset used to drag a Widget using the Finder
final
enterText String?
Needed when ActionType == 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 ActionType != PumpAndSettle.
final
hashCode int
The hash code for this object.
no setteroverride
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({ActionType? actionType, WidgetTester? tester, Finder? finder, String? enterText, Duration? awaitDuration, Function? customAction, bool? executePumpAndSettle, Offset? dragOffset, int? pumpTime, String? actionName}) TestAction
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performAction({dynamic setAsDone(int)?, int actionIndex = 0}) Future<void>
Performs the action
toString() String
A string representation of this object.
inherited

Operators

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