Closed brandellcassio closed 1 month ago
From what I gather is Themes access is failing as when you use a Theme.of(context) ref it will create a new instance. So the work around is to manually apply the font size adjustment via copyWith() at the widget level rightinyour style Theme.of(context)_ ref.
Hey guys!
So, I'm using a custom AppTheme, like this:
I did not put here the part of the code where I put the others styles. Also I set the MaterialApp like this:
My issue is: The
.dp
does not work when I use the text them in a widget.Like this:The other font styles (e.g. fontWeight, fontSize and color) works as expected. However, if I put the
.dp
directly in the widget style like this,it works as expected. Do you guys have any clue about what is happening? Thx!