I have a MaterialApp
in Flutter and want to scale up text throughout the entire app when a certain fontFamily
is used in ThemeData
.
Is this because this certain fontFamily
looks smaller than other fonts.
Is there a way to scale up the font size of the entire app using ThemeData
?
In ThemeData
you have textTheme
property in which you can set the TextTheme
for all widgets under that MaterialApp
. In TextTheme
you can set TextStyle
for various types of texts in you app using parameters like caption, subhead etc. You can increase the size of the font by providing value for fontSize
property in TextStyle
Something like this:
MaterialApp(
theme: ThemeData(
textTheme: TextTheme(
caption: TextStyle(
fontSize: 22.0
),
body1: TextStyle(
fontSize: 22.0
),
),
),
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With