Fontsize looking larger in smaller device than larger screen

Fontsize looking larger in smaller device than larger screen @sakina please give a look,

I tried fontSize: Mediaquery.of(context).size.height * 0.002

Hey @prabhu_nath Sorry for the late reply, but you should use this package:

fontSize: 24.sp

This will adjust according to different devices.

You can also use device_preview | Flutter Package package to test this.

Flutter_screenutil is a great package.
If you want your own then you can do the following
late _orientation;
late double scaleFactor;
if(_orientation == Orientation.landscape)
scaleFactor = (MediaQuery.of(context).size.height/100) * MediaQuery.of(context).textScaleFactor;
else
scaleFactor = (MediaQuery.of(context).size.width/100) * MediaQuery.of(context).textScaleFactor;

That’s just a dummy code.

1 Like

Thanks a lot, I will check and let you know

1 Like

Thanks a lot , I will check and let you know.

thanks for the awesome information.

1 Like