Hey there, consider following scenario: I have a navigation component that hosts one ChildSlot and one ChildStack. Also, each screen in my app is represented by a Component.
• The stack displays application screen components in a classic push-pop manner.
• The slot, on the other hand, displays some of my application’s screens as sheet-like overlay over rest of my screens in the stack.
When I activate something in the slot, I would like the rest of my screens in the stack to go from RESUMED to STARTED lifecycle state and when I dismiss the slot, rest of the screens in the stack should go back from STARTED to RESUMED (onResume is called on their lifecycles). Do I need to implement some custom navigation model for that? 🤔
(My ultimate goal is to implement screen tracking analytics in KMP — I want to track which screens users visit as they navigate around my app, and the easiest solution looks like tracking such event in component lifecycle’s
onResume
callback. I need to track these events when the screen is also
displayed again after closing the sheet, which is why I need that
onResume
to fire again when user closes the sheet.)