getScreenResolution function
Implementation
double getScreenResolution(BuildContext context) {
final width = MediaQuery.of(context).size.width;
return width <= ScreenResolutions.xs
? ScreenResolutions.xs
: width > ScreenResolutions.xs && width <= ScreenResolutions.sm
? ScreenResolutions.sm
: width > ScreenResolutions.sm && width <= ScreenResolutions.md
? ScreenResolutions.md
: width > ScreenResolutions.md && width <= ScreenResolutions.lg
? ScreenResolutions.lg
: ScreenResolutions.xl;
}