Open GeorgeZoiade opened 1 month ago
Flutter Web???
I attempted to reproduce the issue on the latest versions of Flutter and f_modular but couldn't replicate it. It's worth noting that onPopInvoked
has been replaced by onPopInvokedWithResult
.
I navigated to the home screen and after click, moved to the swipe screen. When I click on back button, I received the following message in the console: 'should handle some callback after popping the route'.
Flutter 3.24.2 (stable) Dart SDK 3.5.2 Flutter modular 6.3.4 (and current master)
// deprecated
onPopInvoked: (didPop) {
if (didPop) {
print('should handle some callback after popping the route');
}
}
// new
onPopInvokedWithResult: (didPop, result) {
if (didPop) {
print('should handle some callback after popping the route');
}
}
When using the modular package and pushing to a new route, when swiping back to previous screen, the screen is wrapped in a PopScope widget, but the onPopInvoked method is not working.
Expected behavior When swiping back, onPopInvoked should handle the callback.
This is my code: