ScenarioProfile class
What a folder of scenarios is for — the devices and languages worth offering them in.
Declared once, centrally, and named by a folder's flutter_test_config.dart
(which flutter test discovers by walking up from each test file, so a
mobile folder and a desktop folder can say different things without either
knowing about the other).
The list is the offered set, and its head is the default. The GUI shows
all of it; a bare flutter test takes the first. That is one list doing
both jobs, and it is why "show every phone in the picker but run two in CI"
is not a contradiction — CI brings its own list, and a profile never
declares one.
// test/scenarios/mobile/flutter_test_config.dart
const phones = ScenarioProfile(
'phones',
devices: [Devices.iphone16, Devices.iphoneSe, Devices.androidTall],
languages: ['en', 'fr'],
);
Future<void> testExecutable(FutureOr<void> Function() testMain) =>
runScenarios(testMain, profile: phones);
axes are the project's own: the switches only this app has — a brand, a contrast mode, a feature flag's variant — declared with the values worth running, crossed and photographed the way the devices and languages are.
Constructors
Properties
-
axes
→ Map<
String, List< String> > -
The axes this app defines for itself, each with the values this folder
runs in — the first one, again, the default.
final
-
devices
→ List<
Device> -
The devices this folder's scenarios are worth looking at on. The first is
what a run picks when none is named.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
languages
→ List<
String> -
The locale tags, first one likewise. Empty means the platform default,
which is what a project with one language wants and should not have to
say.
final
- name → String
-
What the profile is called — in the panel, and in a
--profile=on the command line.final -
orientations
→ List<
ScreenOrientation> -
The orientations worth crossing the devices with, first one likewise.
Empty means portrait, which is what almost every folder wants and should
not have to say.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited