DeviceType enum

The DeviceType enum defines different types of devices based on screen size.

Inheritance
Available extensions

Values

small → const DeviceType
const DeviceType(DeviceDimensions.smallMinWidth, DeviceDimensions.smallMaxWidth)
mobile → const DeviceType
const DeviceType(DeviceDimensions.mobileMinWidth, DeviceDimensions.mobileMaxWidth)
tablet → const DeviceType
const DeviceType(DeviceDimensions.tabletMinWidth, DeviceDimensions.tabletMaxWidth)
laptop → const DeviceType
const DeviceType(DeviceDimensions.laptopMinWidth, DeviceDimensions.laptopMaxWidth)
large → const DeviceType
const DeviceType(DeviceDimensions.largeMinWidth, DeviceDimensions.largeMaxWidth)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
maxWidth double
Maximum screen width for this device type.
final
minWidth double
Minimum screen width for this device type.
final
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

Static Methods

detect(double screenWidth) DeviceType
Detects the device type based on the given screen width.

Constants

values → const List<DeviceType>
A constant List of the values in this enum, in order of their declaration.