There was an error while loading. Please reload this page.
In some cases, you may want to group fragment, to remove it all. It will be more understandable with an example.
Let say your user follow these steps in your app.
BasketFragment
CreditCardFormFragment
AddressFormFragment
SuccessFragment
When user paid successfully, you may want to clear payment related steps and go back to BasketFragment. It can be easily done with the Medusa.
First, you need to start fragment with groupName. Let's say PAYMENT for this case.
groupName
navigator.start(creditCardFragment, "PAYMENT") navigator.start(addressFormFragment, "PAYMENT") navigator.start(successFragment, "PAYMENT")
Then you can easily clear payment steps with following code.
navigator.clearGroup("PAYMENT")