Is there a way to make the textScaleFactor the same everywhere?
I know the way to wrap a MediaQuery for every widget that wants to control the textSacleFactor.
But, it’s not elegant. If I just put the MediaQuery in the MaterialApp, most situations are okay, except using “Navigator.of(context).push” or “showModalBottomSheet” etc.
Do you have any ideas to solve it?
2
Answers
Use this plugin for that https://pub.dev/packages/sizer
use
.sp
to resizeYou can use Screen Util for it and just put .sp to get it:- https://pub.dev/packages/flutter_screenutil
Example: