'How to change SearchDelegate StatusBarIcons Color or buildSuggestions body Color in flutter?

In my AppBar the color of my StatusBarIcons is white, just because auf "Brightness.dark" If i use that in my SearchDelegate Window the the body color is dark too. If i just change the primaryColor to grey, then the StatusBarIcons are still black. Has anyone an idea to solve one of these cases?

PLUS: how to change the blue icon/bubble below the cursor and the two underlines white and green, picture 4?

Text

Text

Text

Text



Solution 1:[1]

still open: blue icon/bubble below the cursor

but for the rest my current solution, see code comments:

  @override
  ThemeData appBarTheme(BuildContext context) {
    return ThemeData(
      accentColor: Color(0xFF323232), // for the green line
      scaffoldBackgroundColor: Colors.white, // for the body color
      brightness: Brightness.dark, // to get white statusbar icons
      primaryColor: Color(0xFF323232), // set background color of SearchBar
      textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.white), // cursor color
      textTheme: TextTheme(
        headline6: TextStyle(
          decorationColor: Color(0xFF323232), // color of text underline
        ),
      ),
    );
  }

If someone wants to test all ThemeData Colors:

      backgroundColor: Colors.red,
      bottomAppBarColor: Colors.red,
      canvasColor: Colors.red,
      cardColor: Colors.red,
      dialogBackgroundColor: Colors.red,
      disabledColor: Colors.red,
      dividerColor: Colors.red,
      errorColor: Colors.red,
      focusColor: Colors.red,
      highlightColor: Colors.red,
      hintColor: Colors.red,
      hoverColor: Colors.red,
      indicatorColor: Colors.red,
      primaryColorDark: Colors.red,
      primaryColorLight: Colors.red,
      secondaryHeaderColor: Colors.red,
      selectedRowColor: Colors.red,
      shadowColor: Colors.red,
      splashColor: Colors.red,
      toggleableActiveColor: Colors.red,
      unselectedWidgetColor: Colors.red,
      colorScheme: ColorScheme.fromSwatch().copyWith(secondary: Colors.red),
      scaffoldBackgroundColor: Colors.white,
      primaryColor: Colors.red,

Solution 2:[2]

To change Status bar color just use:

SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(statusBarColor: Colors.white));

To change the color of the blue bubble of cursor use inside your ThemeData:

textSelectionHandleColor: Colors.green,

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Klesley Gonçalves