getCurrentRouteName method

String? getCurrentRouteName()

Get current route name

Implementation

String? getCurrentRouteName() {
  return ModalRoute.of(navigatorKey.currentContext!)?.settings.name;
}