Flutter global font size multiplier

Android and iOS both have a system setting to make texts bigger or smaller in general. Flutter takes it into account. It uses it by default.

Get the value “textScaleFactor” using MediaQuery



In case if you want to turn this mechanism off, or change scaling value for a part of your app, wrap it in your own MediaQuery object.

Widget build(BuildContext context) {
double myOwnScaleFactor = 1.0;
return MediaQuery(
child: Container(), // your app, or part of it
data: MediaQuery.of(context).copyWith(textScaleFactor: myOwnScaleFactor),

Android developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store