【问题标题】:Not able to remove the back button in sliver app bar无法删除 sliver 应用栏中的后退按钮
【发布时间】:2020-10-26 02:45:20
【问题描述】:

我在SliverAppBar下方使用,当我通过Navigation.pushReplacement到达此页面时,我想删除后退按钮

这个 SliverAppBar 嵌套在一个页面中,该页面反过来嵌套在底部栏导航中。

我应该如何移除后退按钮

SliverAppBar(

            expandedHeight: 120.0,
            floating: true,
            pinned: false,
            snap: true,
            elevation: 40,
            backgroundColor: Colors.orange,
            flexibleSpace: FlexibleSpaceBar(
                centerTitle: true,
                title: Padding(
                  padding: const EdgeInsets.only(top: 25),
                  child: Text('Hello'),





                ),


            ),
          ),

【问题讨论】:

    标签: flutter navigation flutter-sliver


    【解决方案1】:

    添加automaticallyImplyLeading = false

    【讨论】:

      【解决方案2】:

      SliverAppBar 中有一个属性automaticallyImplyLeading。将此设置为假。默认为真。

      欲了解更多信息,请访问here

      【讨论】:

        猜你喜欢
        • 2017-12-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-11-30
        • 2016-05-26
        • 2020-01-26
        • 2021-09-06
        相关资源
        最近更新 更多