Solution 1 :
You can change the text scale factor by changing the textScaleFactor
argument.
Text(
"your text here",
textScaleFactor: 1.0,
);
Change 1.0 to whatever you want the scale factor to be.
Solution 2 :
Thanking Levi Stepanek for the answer, I found the way to apply the text scale factor in all parts of the app with the following code:
MaterialApp(
builder: (BuildContext context, Widget child) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.2),
child: child,);},
..
),
Problem :
I am implementing an application in flutter. And as the title says, I want to set my own textScaleFactor on all widgets of this type. Is there any way to overwrite this value in the main.dart? Or how could I set it in a custom class that inherits the type text?
Comments
Comment posted by Saul Rmz
Thank you. Is there any way to put this value in main.dart so that all text widgets have this value?