Created
April 20, 2020 13:00
-
-
Save psygo/dc8fa1af1fe486dbdfa451fb95668e03 to your computer and use it in GitHub Desktop.
How to fix the `textScaleFactor` in Flutter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MaterialApp( | |
builder: (BuildContext context, Widget child){ | |
final MediaQueryData data = MediaQuery.of(context); | |
return MediaQuery( | |
data: data.copyWith( | |
textScaleFactor: 1.0, // hard-coding the accessibility factor | |
), | |
child: child, | |
); | |
}, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comes directly from Flutter Interact '19.