A class representing a modification to the default timeout for a test.
By default, a test will time out after 30 seconds. With new Timeout, that can be overridden entirely; with new Timeout.factor, it can be scaled relative to the default.
Constants
- none → dynamic
-
A constant indicating that a test should never time out.
const Timeout._none()
Constructors
- Timeout(Duration duration)
-
Declares an absolute timeout that overrides the default.
const - Timeout.factor(num scaleFactor)
-
Declares a relative timeout that scales the default.
const - Timeout.parse(String timeout)
-
Parse the timeout from a user-provided string.
factory
Properties
- duration → Duration
-
The timeout duration.
read-only - hashCode → int
-
read-only
- scaleFactor → num
-
The timeout factor.
read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
Methods
-
apply(
Duration base) → Duration -
Returns a new Duration from applying
this
tobase
. -
merge(
Timeout other) → Timeout -
Returns a new Timeout that merges
this
withother
. -
toString(
) → String -
Returns a string representation of this object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited