I managed to change the hintStyle
-color
@override
ThemeData appBarTheme(BuildContext context) {
return ThemeData(
primaryColor: kPrimaryColor,
primaryIconTheme: IconThemeData(
color: Colors.white,
),
inputDecorationTheme: InputDecorationTheme(
hintStyle:
Theme.of(context).textTheme.title.copyWith(color: Colors.white),
),
);
}
But if i type something into the appbar searchfield, the color is still black...
How can I properly change the textcolor
in the SearchDelegate
class?
With reference to the discussion in the comments of the question, appBarTheme
's textTheme
property allows changing the color.
example code credit @Matthias
Code:
textTheme: TextTheme(title: TextStyle( color: Colors.white, fontSize: 18,),),