Alif Muhamad Hafidz
Alif Muhamad Hafidz

Reputation: 1

Back Button didn't show up in new Page of Flutter

i make a new page of flutter but in my case the back button didn't show up automatically. I watch many tutorial and they always have the back button automatically when they make a new page in flutter. anybody know how to solve this problem of mine?

Upvotes: 0

Views: 506

Answers (2)

Davis
Davis

Reputation: 1427

Add some sample of your code please. Meanwhile you can do this

           return Scaffold(
           appBar: AppBar(
          leading: GestureDetector(
             onPress:(){
          Navigator.of(context).pop();
         }          ,
      child: Icon(
             Icons.arrow_back,//add color of your choice
          ), 
        ),
          title: const Text(
            "Where to?",
          ),
        ),
);

Upvotes: 0

Hammad Ali
Hammad Ali

Reputation: 417

Use Navigator.push() instead of Navigator.pushAndRemoveUntil()

Upvotes: 1

Related Questions