Not able to remove the back button in sliver app bar

Issue

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





                ),


            ),
          ),

Solution

Add automaticallyImplyLeading = false

Answered By – EdwynZN

Answer Checked By – Katrina (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.