deviceType property
DeviceType
get
deviceType
Returns the DeviceType based on the screen width.
Implementation
DeviceType get deviceType {
final width = MediaQuery.of(this).size.width;
if (width < 600) {
return DeviceType.mobile;
} else if (width < 1024) {
return DeviceType.tablet;
} else {
return DeviceType.desktop;
}
}