我正在尝试在 Flutter 中重新创建它-> https://blog.uptech.team/how-to-build-resizing-image-in-navigation-bar-with-large-title-8ba2e8bcb840
即,当您拖动时调整标题大小和对齐标题的应用栏(只是标题,我不想要美国队长盾牌)。我查看了 Sliver App Bar,如下所示:
NestedScrollView(
controller: _scrollController,
physics: NeverScrollableScrollPhysics(),
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(
automaticallyImplyLeading: false,
backgroundColor: backgroundColor,
expandedHeight:
MediaQuery.of(context).size.height * 0.25,
floating: false,
pinned: true,
centerTitle: true,
flexibleSpace: FlexibleSpaceBar(
title: Text("Testing",
style: TextStyle(
color: Colors.white,
)),
),
),
];
},
但是,我不确定下一步该去哪里。