提交 088b9926 authored 作者: shixiaochen's avatar shixiaochen

1、搜索appbar设置foregroundColor

上级 8b3aa5e3
...@@ -10,6 +10,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -10,6 +10,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget {
final String? hintText; final String? hintText;
final Widget? leading; final Widget? leading;
final Color? backgroundColor; final Color? backgroundColor;
final Color? foregroundColor;
final bool primary; final bool primary;
final Color? searchBackgroundColor; final Color? searchBackgroundColor;
final Color? inputTextColor; final Color? inputTextColor;
...@@ -25,6 +26,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -25,6 +26,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget {
this.hintText = "请输入搜索内容", this.hintText = "请输入搜索内容",
this.leading, this.leading,
this.backgroundColor, this.backgroundColor,
this.foregroundColor,
this.primary = true, this.primary = true,
this.searchBackgroundColor, this.searchBackgroundColor,
this.inputTextColor, this.inputTextColor,
...@@ -64,6 +66,7 @@ class _SearchAppBarState extends State<SearchAppBar> { ...@@ -64,6 +66,7 @@ class _SearchAppBarState extends State<SearchAppBar> {
tapOutsideBehavior: TapOutsideBehavior.opaqueDismiss, tapOutsideBehavior: TapOutsideBehavior.opaqueDismiss,
child: AppBar( child: AppBar(
backgroundColor: widget.backgroundColor, backgroundColor: widget.backgroundColor,
foregroundColor: widget.foregroundColor,
titleSpacing: 0.0, titleSpacing: 0.0,
primary: widget.primary, primary: widget.primary,
leading: widget.leading, leading: widget.leading,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论