What is the default TextStyle for label in TextField in Flutter?
534
You can set the style
of the DropDownButton
hint and items to:
Theme.of(context).inputDecorationTheme.labelStyle
Example:
Text(
'sample text',
style: Theme.of(context).inputDecorationTheme.labelStyle,
)
Author by
Admin
Updated on December 01, 2022Comments
-
Admin over 1 year
I want to have the same TextStyle for the DropdownButton hint and items (Text) as that of the label in TextField widget. In my case, the dropdown item is as follows -
DropdownMenuItem<String>( value: value, child: Text(value), ); // where the value is a String