We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9114028 commit 85c93ceCopy full SHA for 85c93ce
1 file changed
lib/routes/app_routes.dart
@@ -44,9 +44,8 @@ class AppRoutes {
44
static const String profileEdit = '/profile/edit';
45
46
static GoRouter createRouter({required bool isFirstLaunch}) {
47
- return GoRouter(
+ final router = GoRouter(
48
initialLocation: isFirstLaunch ? welcome : login,
49
- observers: [TalkerRouteObserver()],
50
routes: [
51
ShellRoute(
52
builder: (context, state, child) {
@@ -227,5 +226,17 @@ class AppRoutes {
227
226
),
228
],
229
);
+
230
+ String? _previousUri;
231
+ router.routerDelegate.addListener(() {
232
+ final uri =
233
+ router.routerDelegate.currentConfiguration.uri.toString();
234
+ if (uri != _previousUri) {
235
+ talker.debug('Route: $_previousUri -> $uri');
236
+ _previousUri = uri;
237
+ }
238
+ });
239
240
+ return router;
241
}
242
0 commit comments