import 'package:flutter/material.dart'; double getResponsiveScreenWidth(BuildContext context) { final width = MediaQuery.of(context).size.width; print('screen width: $width'); if (width < 360) { return 320; } else if (width >= 360 && width < 400) { return 360; } else if (width >= 400 && width < 450) { return 412; } else if (width >= 450 && width < 600) { return 480; } else if (width >= 600 && width < 720) { return 540; } else { // width >= 720 (tablet or large) return 612; } } double getResponsiveScreenHeight(BuildContext context) { final height = MediaQuery.of(context).size.height; print('screen height: $height'); if (height < 600) { // very small phones return 568; } else if (height >= 600 && height < 720) { return 640; } else if (height >= 720 && height < 800) { return 720; } else if (height >= 800 && height < 900) { return 812; } else if (height >= 900 && height < 1000) { return 896; } else { // height >= 1000 (tablet or large) return 1024; } }