Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: Navigator.push inside listTile is not working

Tags:

flutter

dart

Navigator.push is not working() When I click on it nothing happends, no error, no change page, nothing...

ListTile(
          leading: const Icon(CupertinoIcons.pencil),
          title: const Text('Edit Profile'),
          onTap: () {
          Navigator.push(
          context,
          MaterialPageRoute(
          builder: (context) => EditProfilePage(
                   uid: userData['uid'])));
                   Navigator.pop(context);
         },
       ),
like image 299
Bee Avatar asked Nov 17 '25 13:11

Bee


1 Answers

Remove Navigator.pop(context);

Explantation: You're popping the page immediately after pushing to it that's why it was behaving as if you weren't pushing at all.

like image 53
Josteve Avatar answered Nov 20 '25 06:11

Josteve