这是Grailed应用程序中标题的一个示例,左上角有一个标题,当页面向下滚动时,标题显示在顶部中间:
这就是我目前的情况:
class AccountPageHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SliverAppBar(
backgroundColor: kMainBG,
expandedHeight: 90,
toolbarHeight: 50,
pinned: true,
elevation: 0,
automaticallyImplyLeading: false,
flexibleSpace: FlexibleSpaceBar(
centerTitle: false,
title: Text(
"Account",
style: TextStyle(color: Colors.white, fontWeight: FontWeight.w800),
),
titlePadding: EdgeInsets.all(kDefaultPadding),
),
actions: [],
);
}
}
我的标题在一个灵活的空间里,当我在页面上向下滚动时,它会在左上角有一种过渡.
如果有人能告诉我如何在Grailed示例中实现应用程序栏,我将不胜感激!蒂娅!