deviceTypeOf static method
Classifies width as DeviceType.mobile, DeviceType.tablet or DeviceType.desktop.
Implementation
static DeviceType deviceTypeOf(double width) {
if (width >= xl) return DeviceType.desktop;
if (width >= lg) return DeviceType.tablet;
return DeviceType.mobile;
}