isScreenSize static method
Implementation
static bool isScreenSize(BuildContext context, ScreenSize size) {
double screenWidth = MediaQuery.of(context).size.width;
switch (size) {
case ScreenSize.small:
return screenWidth < 600;
case ScreenSize.medium:
return screenWidth >= 600 && screenWidth < 1200;
case ScreenSize.big:
return screenWidth >= 1200 && screenWidth < 1600;
case ScreenSize.giant:
return screenWidth >= 1600;
default:
return false;
}
}