ScreenOrientation enum
Which way up a device is — an axis applied on top of a Device, not a device of its own.
A rotated iPad is the same iPad: same id, same ratio, same artwork. A second entry for it would double the table per rotatable device and turn a 4-device × 2-orientation matrix into eight ids instead of two crossed lists.
One landscape, not two. Real hardware has a left and a right, and they differ only in which side the cutout lands on — so a second value would double every matrix to buy a mirrored inset. This one is defined by a fixed physical side: the cutout on the left. Deliberately not "the leading side", which flips under an RTL locale: orientation must not change meaning because the language axis moved.
The enum is open on purpose. A second value can arrive without changing the grammar, and it would be the mirror of this one rather than a new declaration.
Not DeviceOrientation, which Flutter already defines in services.dart
and therefore has in scope in every file that imports material.dart. A
consumer declaring a profile would have had to hide one of the two to name
the other, in the API whose whole job is to be nameable from a
flutter_test_config.dart. Orientation is taken as well, by
widgets.dart.
Values
- portrait → const ScreenOrientation
- landscape → const ScreenOrientation
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - 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
Constants
-
values
→ const List<
ScreenOrientation> - A constant List of the values in this enum, in order of their declaration.