You can use the code below to make your mobile screen responsive :
double getHeight(double screenHeightofthedeviceYouAreDebuging,BuildContextcontext,double size)
{
return (MediaQuery.of(context).size.height / screenHeight) * size;
}
SO if you are debugging with 5 in screen the height of the screen will be 640 or MediaQuery.of(context).size. ( width and height ) will give you the screen size of the testing device
screen Height of the device You Are Debuging = 640
context = BuildContext
size = size you want to be as you image , container etc height
.
So it will convert the size of the screen according to the device used
double getWidth(double screenWidthofthedeviceYouAreDebuging,BuildContext context,double size){
return (MediaQuery.of(context).size.width / screenHeight) * size;
}
EdgeInsets padding(top,bottom,left,right,context){
return EdgeInsets.only(
top: getHeight(640, context, top),
bottom: getHeight(640, context, bottom),
left: getHeight(640, context, left),
right: getHeight(640, context, right));
}