dreampad/lib/app/shared/helpers/getx_route_observer.dart
2023-11-28 10:45:09 +08:00

15 lines
435 B
Dart

import 'package:flutter/material.dart';
import 'package:get/get_navigation/src/router_report.dart';
class GetXRouteObserver extends NavigatorObserver {
@override
void didPush(Route<dynamic> route, Route<dynamic>? previousRoute) {
RouterReportManager.reportCurrentRoute(route);
}
@override
void didPop(Route<dynamic> route, Route<dynamic>? previousRoute) async {
RouterReportManager.reportRouteDispose(route);
}
}