TestVariant<T> class abstract

An abstract base class for describing test environment variants.

These serve as elements of the variants argument to testWidgets.

Use care when adding more testing variants: it multiplies the number of tests which run. This can drastically increase the time it takes to run all the tests.



A const constructor so that subclasses can be const.


hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Iterable<T>
Returns an iterable of the variations that this test dimension represents.
no setter


describeValue(T value) String
Returns the string that will be used to both add to the test description, and be printed when a test fails for this variation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
setUp(T value) Future<Object?>
A function that will be called before each value is tested, with the value that will be tested.
tearDown(T value, covariant Object? memento) Future<void>
A function that is guaranteed to be called after a value is tested, even if it throws an exception.
toString() String
A string representation of this object.


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