DeviceOrientation enum
Specifies a particular device orientation.
To determine which values correspond to which orientations, first position the device in its default orientation (this is the orientation that the system first uses for its boot logo, or the orientation in which the hardware logos or markings are upright, or the orientation in which the cameras are at the top). If this is a portrait orientation, then this is portraitUp. Otherwise, it's landscapeLeft. As you rotate the device by 90 degrees in a counter-clockwise direction around the axis that pierces the screen, you step through each value in this enum in the order given.
For a device with a landscape default orientation, the orientation obtained by rotating the device 90 degrees clockwise from its default orientation is portraitUp.
Values
- portraitUp → const DeviceOrientation
-
If the device shows its boot logo in portrait, then the boot logo is shown in portraitUp. Otherwise, the device shows its boot logo in landscape and this orientation is obtained by rotating the device 90 degrees clockwise from its boot orientation.
- landscapeLeft → const DeviceOrientation
-
The orientation that is 90 degrees counterclockwise from portraitUp.
If the device shows its boot logo in landscape, then the boot logo is shown in landscapeLeft.
- portraitDown → const DeviceOrientation
-
The orientation that is 180 degrees from portraitUp.
- landscapeRight → const DeviceOrientation
-
The orientation that is 90 degrees clockwise from portraitUp.
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<
DeviceOrientation> - A constant List of the values in this enum, in order of their declaration.