DeviceInfo class Null safety

The device info about the width, height and view padding of a device.

Constructors

DeviceInfo({required BuildContext context})
Initialises the width, height and viewPadding of a device based on the context.
DeviceInfo.withValues({required double width, required double height, required EdgeInsets viewPadding})
Named constructor to create DeviceInfo without a BuildContext.

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
height double
The logical pixel height of this screen.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
safeHeight double
The safe height to place widgets; reduced from the top and bottm of viewPadding.
read-only
viewPadding EdgeInsets
The vide padding of this screen.
final
width double
The logical pixel width of this screen.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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