auto_route_devtools 0.2.0 copy "auto_route_devtools: ^0.2.0" to clipboard
auto_route_devtools: ^0.2.0 copied to clipboard

auto_route adapter for the navigation_devtools DevTools extension — live backstack, router tree, args, and interactive navigation for auto_route apps.

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.
0
likes
150
points
65
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

auto_route adapter for the navigation_devtools DevTools extension — live backstack, router tree, args, and interactive navigation for auto_route apps.

Repository (GitHub)

Topics

#devtools #auto-route #navigation #debugging #flutter

License

MIT (license)

Dependencies

auto_route, flutter, navigation_devtools, navigation_devtools_shared

More

Packages that depend on auto_route_devtools