Use font size from IDE in theme (WIP)#2459
Conversation
Instead of using rowHeight consts like 24.0, could you do |
| import 'ui/theme.dart'; | ||
|
|
||
| const DEFAULT_FONT_SIZE = 14.0; | ||
| var fontSizeFactor = 1.0; |
There was a problem hiding this comment.
this data should not be stored as a top level field like this as that could easily cause problems due to being fragile.
For example, now the themeFor method has a surprising side effect.
It is better to use the font sizes froom the existing textTheme part of a theme.
There was a problem hiding this comment.
I was hoping to use the theme to find the font size, but it looked like this would mean passing it through a lot of logic for generating inspector rows. Is there any way around doing that?
|
Closing in favor of #3054 |
This passes font size from URL parameters and scales all text to the input size. I assumed based on https://api.flutter.dev/flutter/material/TextTheme-class.html that size 14 is default for body text, and visually it looks like if I pass in
?fontSize=14things are unchanged.Examples:
?fontSize=10`?fontSize=20

