Hey guys, I'm having trouble to use `popUpTo` with...
# compose
d
Hey guys, I'm having trouble to use
popUpTo
with a route which includes an optional argument. Is it supposed to work? Is it an issue ?
i
Make sure you've added the import - it is an extension function
d
Yes, I have the extension function, I managed to use it. My problem is that the back stack is not cleared when I pass a route with arguments to the
popUpTo
builder. Does it make sense to you ?
i
Make sure you're passing the exact
route
you used in your
composable
, with all the same
{args}
blocks and everything
d
in my composable, I pass the route like that:
login?error={error}
and in the pop-up builder, I pass it like that
login?error=true
so you mean I should pass it with the template arg in the popUpTo builder ?
i
Yes, with the template. Literally needs to be the exact same string
d
Thanks a lot @Ian Lake, it's working now.
🎉 1