TwinDeviceType enum

The kind of hardware the app is running on.

This is a hardware fact and stays the same for the whole session, no matter whether the device is currently open, closed or folded.

Inheritance
Available extensions

Values

standard → const TwinDeviceType

An ordinary phone, tablet, desktop or browser without a fold.

foldable → const TwinDeviceType

A book-style foldable whose fold is vertical in its natural orientation, for example Galaxy Z Fold, Pixel Fold, Honor Magic V or iPhone Duo.

flip → const TwinDeviceType

A clamshell flip phone whose fold is horizontal in its natural orientation, for example Galaxy Z Flip, Xiaomi Mix Flip or Moto Razr.

dualScreen → const TwinDeviceType

Two physical panels joined by a hinge, for example Surface Duo.

unknown → const TwinDeviceType

The platform cannot tell. Web browsers report this until they expose a fold through the Viewport Segments API.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
isFoldable → bool
Whether the device has a fold or a hinge.
no setter
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<TwinDeviceType>
A constant List of the values in this enum, in order of their declaration.