isScreen static method
Screen equals
or greater
than.
Implementation
static bool isScreen(BuildContext context,
{bool mobileSmall = false,
bool mobileMedium = false,
bool mobileLarge = false,
bool tablet = false,
bool laptop = false,
bool laptopLarge = false,
bool fourK = false}) {
double width = MediaQuery.of(context).size.width;
if (mobileSmall && width >= _dimension!.mobileSmall) {
return true;
}
if (mobileMedium && width >= _dimension!.mobileMedium) {
return true;
}
if (mobileLarge && width >= _dimension!.mobileLarge) {
return true;
}
if (tablet && width >= _dimension!.tablet) {
return true;
}
if (laptop && width >= _dimension!.laptop) {
return true;
}
if (laptopLarge && width >= _dimension!.laptopLarge) {
return true;
}
if (fourK && width >= _dimension!.fourK) {
return true;
}
return false;
}