MatrixVariant class

A robust TestVariant combiner that builds a Cartesian product matrix out of multiple independent TestVariant instances.

This allows you to scale widget tests across multiple dimensions simultaneously (e.g., combining simulated devices, environment features, localization languages, or user profiles) without nesting loops or duplicating test code.

All setUp and tearDown lifecycle events of the combined variants are automatically triggered and managed sequentially under the hood.

Inheritance

Constructors

MatrixVariant(Set<TestVariant> variants)
Instantiates a new matrix using a collection of discrete TestVariant instances.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Set<Map<TestVariant, dynamic>>
Returns an iterable of the variations that this test dimension represents.
final
variants Set<TestVariant>
The collection of individual test variants to be multiplied.
final

Methods

describeValue(Map<TestVariant, dynamic> value) String
Concatenates the descriptive string tags of all embedded variants for console test runners.
override
get<V>(TestVariant<V> variant) → V
Retrieves the active configurations for a specific TestVariant instance.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setUp(Map<TestVariant, dynamic> value) Future<void>
Captures the runtime combination slice and forwards setup triggers to child variants sequentially.
override
tearDown(Map<TestVariant, dynamic> value, covariant Object? memento) Future<void>
Forwards teardown signals to child variations in reverse execution order and releases references.
override
toString() String
A string representation of this object.
inherited

Operators

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