Milad-Akarie / auto_route_library

Flutter route generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I listen to change from: Stack Route A => Stack Route B (Children: [Tab Route C (initial)])

hieubui2409 opened this issue · comments

@Milad-Akarie I have router setup like that:

  • Stack Route A
  • Stack Route B
    --> Tab Route C (initial)
    --> Tab Route D
    I'm currently using AutoRouteAwareStateMixin in Tab Route C but when I push from Stack Route A to Stack Route B (which actual redirect to initial Tab Route C), none of didInitTabRoute, didChangeTabRoute, didPush fired. Can you help me with this usecase.

@hieubui2409 didInitTabRoute and didChangeTabRoute must be implemented in the root-tab widget it won't react to it's children.
not sure what your usecase is but eventually you could just listen to tabsRouter changes and check which index/route is active anywhere in it's subtree.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions