Skip to content

Commit

Permalink
Update route_observer.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
jonataslaw authored Aug 6, 2021
1 parent 1d1dae5 commit ee6e490
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/get_navigation/src/routes/observers/route_observer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class GetObserver extends NavigatorObserver {
Get.log("GOING TO ROUTE ${newRoute.name}");
}

// RouterReportManager.reportCurrentRoute(route);
RouterReportManager.reportCurrentRoute(route);
_routeSend?.update((value) {
// Only PageRoute is allowed to change current value
if (route is PageRoute) {
Expand Down Expand Up @@ -143,9 +143,9 @@ class GetObserver extends NavigatorObserver {
} else if (currentRoute.isGetPageRoute) {
Get.log("CLOSE TO ROUTE ${currentRoute.name}");
}
// if (previousRoute != null) {
// RouterReportManager.reportCurrentRoute(previousRoute);
// }
if (previousRoute != null) {
RouterReportManager.reportCurrentRoute(previousRoute);
}

// Here we use a 'inverse didPush set', meaning that we use
// previous route instead of 'route' because this is
Expand Down Expand Up @@ -181,9 +181,9 @@ class GetObserver extends NavigatorObserver {
Get.log("REPLACE ROUTE $oldName");
Get.log("NEW ROUTE $newName");

// if (oldRoute != null) {
// RouterReportManager.reportCurrentRoute(oldRoute);
// }
if (newRoute != null) {
RouterReportManager.reportCurrentRoute(newRoute);
}

_routeSend?.update((value) {
// Only PageRoute is allowed to change current value
Expand Down

0 comments on commit ee6e490

Please sign in to comment.