08/05/2023 6:19 pm
Topic starter
Notifications
Clear all
Why is WillPopScope widget not working in my flutter code?
Bug’s Forum
0
Posts
1
Users
0
Likes
162
Views
0
I’m using this function on my custom button to go back one screen, but onWillPop callback is never called
static Future<bool> back(BuildContext context) async { if (Navigator.of(context).canPop()) { return Navigator.of(context).pop(); } else { await SystemNavigator.pop(); return true; } }
Answer
Add a comment
Add a comment
Forum Information
- 14 Forums
- 1,835 Topics
- 5,051 Posts
- 0 Online
- 1,078 Members
Our newest member: Richardnop
Latest Post: loli
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed