<@UHAJKUSTU> I have a childStack and in the first ...
# decompose
v
@Arkadii Ivanov I have a childStack and in the first screen i have a bottom nav using childStack One back button press how can i move to a specific bottom nav tab and on next back press, close the app I tried using
BackCallback
but, it lands me back to that tab on back press, but on next back press it does not close the app I'm using
navigator.pop()
for this
a
You have to set BackCallback#enabled flag to false, so that the parent stack could navigate. The best way is to subscribe to the tab stack and update the enabled flag on every emission. There is no need to unsubscribe from stack btw.
v
Okay So first in doOnCreate i have to register the BackCallback and then change the callback.isEnabled by listening to the active item
a
Yes. You can also do it in
init {}
block.