Not able to remove the back button in sliver app bar

Viewed 2043

I am using below SliverAppBar , I want to remove the back button when I reach this page through Navigation.pushReplacement

This SliverAppBar is nested in a page which is in return nested in bottom bar navigation.

How should I remove the back button

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'),





                ),


            ),
          ),
2 Answers

Add automaticallyImplyLeading = false

There is a property in SliverAppBar automaticallyImplyLeading. Set this to false. By default it is true.

For more information visit here

Related