I'm creating a simple ToDo app and checking about the Navigation methods to return to my mainFragment from the AddTask Fragment. And I found that I can return using navigateUp() and also popBackStack(), but I don't understand the difference.
When I use this:
Navigation.findNavController(it).navigateUp()
Or this:
Navigation.findNavController(it).popBackStack()
I return to the mainFragment and I think, the addTaskFragment is popped from the stack, so could someone please explain me?
