Skip to content

Apply a fontSizeFactor to textTheme that is different to 1 crash #170

Closed Answered by rydmike
JobiJoba asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @JobiJoba, glad you noticed that, I was about to mention it too that this is the way ThemeData and TextTheme works, not really related to FlexColorScheme.

The textTheme does not actually have any size information until it has passed the localization step in the setup of the MaterialApp.

You can do what you are trying to do, if you add an extra Builder or a custom wrapper widget that all it does is apply the font size mods you want to add, in a new Theme, basically wrapping everything with an extra theme layer. Don't worry about the overhead for this, many Flutter SDK widgets do this as well internally.

Depends a bit on what you are trying to accomplish with the fontSizeFactor. Maybe so…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@martin-braun
Comment options

Answer selected by rydmike
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question This issue is a usage question and will be moved to the Discussions section. works as expected Reported issue is not a bug, everything works as expected and designed
3 participants
Converted from issue

This discussion was converted from issue #165 on July 14, 2023 22:06.