Let's say I have 4 fragments and navigate through them in the order
A
-> B
-> C
-> D
using a NavController
object.
A is my home screen.
I'd like to write a single function called
goToA()
that can be inherited and called from either B
, C
or D
which navigates to A
and clears up the back stack
How do I go about that?