崩溃的标题栏带有动画

时间:2019-10-14 15:57:15

标签: flutter dart flutter-sliver flutter-appbar

我正试图在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,
                    )),
              ),
            ),
          ];
        },

但是我不确定从这里接下来要去哪里。

1 个答案:

答案 0 :(得分:1)

我相信您正在寻找属于Cupertino小部件集合的CupertinoSliverNavigationBar