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

Time:06-20

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?

CodePudding user response:

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

CodePudding user response:

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?",
          ),
        ),
);
  • Related