Skip to content

AutoRouteAware and AutoRouteAwareStateMixin don't work #2315

@finnvyrn

Description

@finnvyrn

No tab or nested route involved.

With the following

return MaterialApp.router(
  routerConfig: _appRouter.config(
    navigatorObservers: () => [MyObserver()],
  ),
);

the observer logs correctly at pop and push.

But the following doesn't print anything:

class BooksListPageState extends State<BookListPage> with AutoRouteAwareStateMixin<BookListPage> {
  // only override if this is a stack page
  @override
  void didPopNext() { print(...); }

  // only override if this is a stack page
  @override
  void didPushNext() { print(...); }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions