didPop method
The Navigator popped route
.
The route immediately below that one, and thus the newly active
route, is previousRoute
.
Implementation
@override
void didPop(Route route, Route? previousRoute) {
var context = navigator?.context;
if (context != null) {
var ref = ProviderScope.containerOf(context);
// _clearUser(ref);
try {
ref.read(onBackBtnTappedProvider).call(context);
} catch (_) {}
}
super.didPop(route, previousRoute);
}