提交 6eb76a1e authored 作者: shixiaochen's avatar shixiaochen

1、MyPageAppBar增加titleSpacing属性

上级 6e3e99ff
...@@ -29,4 +29,6 @@ ...@@ -29,4 +29,6 @@
## 1.1.4 ## 1.1.4
* 修复BaseListWidget多次触发自动刷新无反应问题 * 修复BaseListWidget多次触发自动刷新无反应问题
* ## 1.1.5 * ## 1.1.5
* SearchAppBar增加leadingWidth属性 * SearchAppBar增加leadingWidth属性
\ No newline at end of file * ## 1.1.6
* MyPageAppBar增加titleSpacing属性
\ No newline at end of file
...@@ -10,6 +10,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -10,6 +10,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget {
final Widget? leading; // 左侧widget final Widget? leading; // 左侧widget
final double? elevation; // 阴影 final double? elevation; // 阴影
final Widget? titleWidget; // 自定义标题widget final Widget? titleWidget; // 自定义标题widget
final double? titleSpacing; // 标题横向padding
const MyPageAppBar({ const MyPageAppBar({
Key? key, Key? key,
...@@ -22,6 +23,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -22,6 +23,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget {
this.leading, this.leading,
this.elevation = 0, this.elevation = 0,
this.titleWidget, this.titleWidget,
this.titleSpacing,
}) : super(key: key); }) : super(key: key);
@override @override
...@@ -29,6 +31,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget { ...@@ -29,6 +31,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget {
return AppBar( return AppBar(
key: key, key: key,
centerTitle: true, centerTitle: true,
titleSpacing: titleSpacing,
title: titleWidget ?? title: titleWidget ??
Text(title ?? "", style: TextStyle(color: foregroundColor)), Text(title ?? "", style: TextStyle(color: foregroundColor)),
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论