Specifies a particular device orientation.

Discussion:

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 traverses 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.)

Constants

landscapeLeft DeviceOrientation

The orientation that is 90 degrees clockwise from portraitUp.

const DeviceOrientation(1)
landscapeRight DeviceOrientation

The orientation that is 90 degrees counterclockwise from portraitUp.

const DeviceOrientation(3)
portraitDown DeviceOrientation

The orientation that is 180 degrees from portraitUp.

const DeviceOrientation(2)
portraitUp 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.

const DeviceOrientation(0)
values List<DeviceOrientation>

A constant List of the values in this enum, in order of their declaration.

const List<DeviceOrientation>

Properties

index int
read-only
hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited