79535381

Date: 2025-03-26 04:19:03
Score: 1
Natty:
Report link

So as far as I understand you want to get the current route/screen, I think you can do it just like a normal nav getting first destination and then route getRoute, something like this:

val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentRoute = navBackStackEntry?.destination?.route
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jordan R. A.