提交 356fd34f authored 作者: shixiaochen's avatar shixiaochen

1、SearchAppBar增加searchIconSize属性

上级 04ec2ce5
...@@ -17,6 +17,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -17,6 +17,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget {
final Color? hintTextColor; final Color? hintTextColor;
final Color? searchTextColor; final Color? searchTextColor;
final Color? searchIconColor; final Color? searchIconColor;
final double? searchIconSize;
final Function? onFocusListener; final Function? onFocusListener;
final String? rightText; final String? rightText;
final Function? onRightBtnCallback; final Function? onRightBtnCallback;
...@@ -37,6 +38,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -37,6 +38,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget {
this.rightText, this.rightText,
this.onRightBtnCallback, this.onRightBtnCallback,
this.searchIconColor, this.searchIconColor,
this.searchIconSize,
}) : super(key: key); }) : super(key: key);
@override @override
...@@ -84,7 +86,11 @@ class _SearchAppBarState extends State<SearchAppBar> { ...@@ -84,7 +86,11 @@ class _SearchAppBarState extends State<SearchAppBar> {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
hGap10, hGap10,
Icon(Icons.search, color: widget.searchIconColor ?? Colors.grey.shade300), Icon(
Icons.search,
color: widget.searchIconColor ?? Colors.grey.shade300,
size: widget.searchIconSize,
),
hGap5, hGap5,
Expanded( Expanded(
child: TextField( child: TextField(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论