提交 5bb2bb49 authored 作者: shixiaochen's avatar shixiaochen

1、MyPageAppBar增加属性titleWidget

上级 ab05d096
......@@ -11,6 +11,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget {
final bool exitApp;
final Widget? leading;
final double? elevation;
final Widget? titleWidget;
const MyPageAppBar({
Key? key,
......@@ -24,6 +25,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget {
this.exitApp = false,
this.leading,
this.elevation = 0,
this.titleWidget,
}) : super(key: key);
@override
......@@ -31,7 +33,7 @@ class MyPageAppBar extends StatelessWidget implements PreferredSizeWidget {
return AppBar(
key: key,
centerTitle: true,
title: Text(title ?? "", style: TextStyle(color: foregroundColor)),
title: titleWidget ?? Text(title ?? "", style: TextStyle(color: foregroundColor)),
backgroundColor: backgroundColor,
foregroundColor: foregroundColor,
primary: primary,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论