提交 876aae7a authored 作者: shixiaochen's avatar shixiaochen

1、SearchAppBar增加搜索背景圆角属性设置

上级 6fbca4c6
...@@ -44,4 +44,6 @@ ...@@ -44,4 +44,6 @@
* hideName姓名脱敏 * hideName姓名脱敏
* ## 1.2.2 * ## 1.2.2
* hideBankCard银行卡号脱敏 * hideBankCard银行卡号脱敏
* ## 1.2.3
* SearchAppBar增加搜索背景圆角属性设置
\ No newline at end of file
...@@ -23,6 +23,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -23,6 +23,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget {
final bool automaticallyImplyLeading; final bool automaticallyImplyLeading;
final TextEditingController? textEditingController; final TextEditingController? textEditingController;
final double? leadingWidth; final double? leadingWidth;
final double? searchBgRadius; // 搜索背景圆角
const SearchAppBar({ const SearchAppBar({
Key? key, Key? key,
...@@ -46,6 +47,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -46,6 +47,7 @@ class SearchAppBar extends StatefulWidget implements PreferredSizeWidget {
this.automaticallyImplyLeading = true, this.automaticallyImplyLeading = true,
this.textEditingController, this.textEditingController,
this.leadingWidth, this.leadingWidth,
this.searchBgRadius,
}) : super(key: key); }) : super(key: key);
@override @override
...@@ -90,7 +92,8 @@ class _SearchAppBarState extends State<SearchAppBar> { ...@@ -90,7 +92,8 @@ class _SearchAppBarState extends State<SearchAppBar> {
child: Container( child: Container(
margin: widget.margin, margin: widget.margin,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(20.0)), borderRadius: BorderRadius.all(
Radius.circular(widget.searchBgRadius ?? 20.0)),
color: color:
widget.searchBackgroundColor ?? const Color(0xFFEEEEEE), widget.searchBackgroundColor ?? const Color(0xFFEEEEEE),
), ),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论