auto_route_devtools

auto_route (v11) adapter for the navigation_devtools DevTools panel: live backstack across nested routers, the full static router tree with guard badges, path/query params and args previews, and confirm-gated navigatePath/pop from the panel.

Setup

import 'package:auto_route_devtools/auto_route_devtools.dart';

void main() {
  final router = AppRouter();
  AutoRouteDevTools.init(router);
  runApp(MaterialApp.router(
    routerConfig: router.config(
      navigatorObservers: () => [AutoRouteDevTools.navigationObserver()],
    ),
  ));
}

Run your app and open the navigation_devtools tab in Flutter DevTools.

Prefer the adapter API directly? AutoRouteDevTools is a thin facade over it:

final adapter = AutoRouteAdapter(router);
NavigationDevTools.register(adapter);
// observers: () => [adapter.observer]

Migrating from 0.0.x

  • Your AutoRouteDevTools.init(...) / navigationObserver() wiring keeps working unchanged.
  • The DevTools tab is now called navigation_devtools (the panel moved into the shared core package and also supports Navigator 1.0, custom RouterDelegates, and go_router).

Dialogs & bottom sheets

showDialog/showModalBottomSheet are pageless routes on the raw Navigator — auto_route's stack never includes them. To see them in the panel, pair the adapter with a Navigator1Adapter observer:

final pageless = Navigator1Adapter(label: 'Pageless routes');
NavigationDevTools.register(pageless);
// in your router config:
navigatorObservers: () => [AutoRouteDevTools.navigationObserver(), pageless.observer],

Prior art

Known limitations

  • Route args are arbitrary objects — shown as runtimeType + toString() preview.
  • Push-by-name is not supported (path-based navigation only).
  • Registration is a hard no-op under kReleaseMode.