I need to create a custom widget that sits alongside of TextFormField
s, so I have to style its label to match TextFormField
's label style.
This does NOT work:
Theme.of(ctx).inputDecorationTheme.labelStyle
Because, according to its doc:
If null, defaults to a value derived from the base [TextStyle] for the input field and the current [Theme].
The problem is, I don't know how to get that base style.
You are getting the base style correctly. In my case labelStyle
and hintStyle
from InputDecorationTheme
can not be updated by hot reload, but they work when rerunning the app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With