【发布时间】:2021-10-03 08:26:19
【问题描述】:
关于 Flutter 搜索代理:
How to remove text underline and blue line (color) below text?
或者
to set transparent or to change color?
我不想用新的文本字段等更改完整的小部件,因为 SearchDelegate 已经很好或者是一个完成的小部件。
我的代码在 Flutter 的 SearchDelegate Widget 中:
@override
ThemeData appBarTheme(BuildContext context) {
return ThemeData(
dividerTheme: DividerThemeData(
color: Colors.white,
),
primaryIconTheme: IconThemeData(color: Colors.white),
scaffoldBackgroundColor: Colors.white, // for the body color
brightness: Brightness.dark, // to get white statusbar icons
primaryColor: glovar.getColor(farbnr), // set background color of SearchBar
textSelectionTheme: TextSelectionThemeData(
cursorColor: Colors.white,
), // cursor color
);
}
【问题讨论】:
-
你能分享你的代码吗
-
代码在上面,一些答案在下面。我不想更改完整的小部件,所以上面的答案并不是真正的解决方案,而是一种解决方法(就像我看到的那样)