Frezyx / talker

☎️ Advanced error handler and logger for dart and flutter apps
https://pub.dev/packages/talker_flutter
MIT License
525 stars 64 forks source link

TalkerRouteObserver does not work with Navigator widget #258

Open NapasPayu opened 2 months ago

NapasPayu commented 2 months ago

Describe the bug I use TalkerRouteObserver with Navigator widget, but I can't see any logs when navigating. However, TalkerRiverpodObserver works fine.

dependencies: talker: ^4.4.1 talker_dio_logger: ^4.4.1 talker_riverpod_logger: ^4.4.1

@override
Widget build(BuildContext context, WidgetRef ref) {
  final talker = Talker();

  return ProviderScope(
    observers: [
      TalkerRiverpodObserver(talker: talker),
    ],
    child: Navigator(
      key: nestedNavigatorKey,
      initialRoute: '/',
      onGenerateRoute: ...,
      observers: [
        TalkerRouteObserver(talker),
      ],
    ),
  );
}