TargetPlatformVariant class Null safety
A TestVariant that runs tests with debugDefaultTargetPlatformOverride set to different values of TargetPlatform.
- Inheritance
-
- Object
- TestVariant<
TargetPlatform> - TargetPlatformVariant
Constructors
-
TargetPlatformVariant(Set<
TargetPlatform> values) -
Creates a TargetPlatformVariant that tests the given values.
const
-
TargetPlatformVariant.all({Set<
TargetPlatform> excluding = const <TargetPlatform>{}}) -
Creates a TargetPlatformVariant that tests all values from
the TargetPlatform enum. If
excluding
is provided, will test all platforms except those inexcluding
. - TargetPlatformVariant.desktop()
- Creates a TargetPlatformVariant that includes platforms that are considered desktop platforms.
- TargetPlatformVariant.mobile()
- Creates a TargetPlatformVariant that includes platforms that are considered mobile platforms.
- TargetPlatformVariant.only(TargetPlatform platform)
- Creates a TargetPlatformVariant that tests only the given value of TargetPlatform.
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
values
→ Set<
TargetPlatform> -
Returns an iterable of the variations that this test dimension represents.
final
Methods
-
describeValue(
TargetPlatform 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.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
setUp(
TargetPlatform value) → Future< TargetPlatform?> -
A function that will be called before each value is tested, with the
value that will be tested.
override
-
tearDown(
TargetPlatform value, covariant TargetPlatform? memento) → Future< void> -
A function that is guaranteed to be called after a value is tested, even
if it throws an exception.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited