deviceSize property
DeviceSize
get
deviceSize
deviceSize
represent the device size enumeration while it based on device width
Implementation
DeviceSize get deviceSize {
if (deviceWidth < LayoutBreakPoint.kXsBreakPoint) {
return DeviceSize.xs;
} else if (LayoutBreakPoint.kXsBreakPoint <= deviceWidth &&
deviceWidth < LayoutBreakPoint.kSmBreakPoint) {
return DeviceSize.sm;
} else if (LayoutBreakPoint.kSmBreakPoint <= deviceWidth &&
deviceWidth < LayoutBreakPoint.kMdBreakPoint) {
return DeviceSize.md;
} else if (LayoutBreakPoint.kMdBreakPoint <= deviceWidth &&
deviceWidth < LayoutBreakPoint.kLgBreakPoint) {
return DeviceSize.lg;
} else if (LayoutBreakPoint.kLgBreakPoint <= deviceWidth &&
deviceWidth < LayoutBreakPoint.kGlBreakPoint) {
return DeviceSize.xl;
} else if (LayoutBreakPoint.kGlBreakPoint <= deviceWidth &&
deviceWidth < LayoutBreakPoint.kRlBreakPoint) {
return DeviceSize.gl;
} else {
return DeviceSize.rl;
}
}