I want to change the color of the appbar of the SearchDelegate. So I did the following
class DataSearch extends SearchDelegate<String> {
var suggestionList = [];
@override
ThemeData appBarTheme(BuildContext context) {
assert(context != null);
final ThemeData theme = Theme.of(context);
assert(theme != null);
return ThemeData(
primaryColor: createMaterialColor(Color(0xFF0E2848)));
}
The problem with this is that the text in the status bar and the search text is black. I would like it to be white. So I attempted to change the brightness.
class DataSearch extends SearchDelegate<String> {
var suggestionList = [];
@override
ThemeData appBarTheme(BuildContext context) {
assert(context != null);
final ThemeData theme = Theme.of(context);
assert(theme != null);
return ThemeData(
primaryColor: createMaterialColor(Color(0xFF0E2848)),
brightness: Brightness.dark);
}
However the entire screen appears to be dark mode, with all the list tiles in dark mode too.
How do I just get the text and status bar to be white.

