Device class

Constructors

Device(MediaQueryData data)
const
Device.of(BuildContext context)
factory

Properties

bottomBorderSize double
no setter
brightness Brightness
no setter
data MediaQueryData
final
hashCode int
The hash code for this object.
no setterinherited
height double
no setter
landscape bool
no setter
landscapeScreenRatio double
no setter
max double
no setter
min double
no setter
portrait bool
no setter
ratio double
no setter
revertedRatio double
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenRatio double
no setter
size Size
no setter
topBorderSize double
no setter
width double
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onOrientation<T>({InitFactory<T>? portrait, InitFactory<T>? landscape, dynamic args}) → T
toDp(double value) double
Converts px to logical display points PX -> DP
toDpOffset(Offset offset) Offset
toDpSize(Size size) Size
toPx(double value) double
Converts logical display points to px DP -> PX
toPxOffset(Offset offset) Offset
toPxSize(Size size) Size
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

onPlatform<T>({T android()?, T ios()?, T web()?, T desktop()?, T defaultValue()?}) → T?