DeviceSize enum
The current viewport-width / layout class of the window.
This is the layout width class the UI should adapt its structure to (narrow / medium / wide), derived from the ResponsiveScope's width via classify. It is deliberately orthogonal to two other device concepts in this package, which it must not be conflated with:
- DevicePlatform — the operating system (iOS / Android / web / macOS /
Windows / Linux). For "is this a phone OS?" use
DevicePlatform, notDeviceSize. DeviceFormFactor— the physical device form factor (phone / tablet / desktop / browser), used server-side for notification-delivery prioritization and not barrel-exported. It shares thetablet/desktopnames withDeviceSize(andphone≈mobile), but it describes the hardware, whereasDeviceSizedescribes the current window width.
Values
- mobile → const DeviceSize
-
Narrow window —
width < Breakpoints.tablet. - tablet → const DeviceSize
-
Medium window —
Breakpoints.tablet <= width < Breakpoints.desktop. - desktop → const DeviceSize
-
Wide window —
width >= Breakpoints.desktop.
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<
DeviceSize> - A constant List of the values in this enum, in order of their declaration.