PersistentTabView add onRedirect callback;#160
Conversation
PersistentTabView add onRedirect callback;PersistentTabView add onRedirect callback;
|
Hi, I guess you want to prevent switching to a tab in certain cases? Can you elaborate the use case of that so I get a better understanding of it? It does seem unusual and you could implement it on your own using a custom nav bar widget. Thats why I'm unsure if that should be included in the package :) |
|
I am sorry for the late reply. CleanShot.2024-06-19.at.10.44.13.mp4 |
|
I believe I understand what you're aiming to achieve :) However, I think this approach might involve more work than anticipated. Here are my initial thoughts: For naming and using the callback, I prefer Additionally, we need to consider what happens when the user uses the Android back button. By default, the controller iterates through the tab history backwards and might encounter a tab that should not be switched to. In that case, we should probably skip this item and immediately move to the next one (if available). |
I found there was no way to handle the jump intercept, when I used
PersistentTabViewconstruction method. Sometimes we don't want to usego_router,although it's good enough.So, I want to add something.