routeName property
Object?
get
routeName
Gets the name of the current route, if available.
Returns the name of the route from ModalRoute.settings, or null if no
route is currently active.
Implementation
Object? get routeName => ModalRoute.of(this)?.settings.name;