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, not DeviceSize.
  • DeviceFormFactor — the physical device form factor (phone / tablet / desktop / browser), used server-side for notification-delivery prioritization and not barrel-exported. It shares the tablet / desktop names with DeviceSize (and phonemobile), but it describes the hardware, whereas DeviceSize describes the current window width.
Inheritance
Available extensions

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.