getRouteName method

String getRouteName()

Get the route name for a page. e.g. getRouteName() { return "/about-page"; }

Implementation

String getRouteName() {
  if (this.routeName != null) {
    return this.routeName!;
  } else if (controller != null && controller!.context != null) {
    return ModalRoute.of(controller!.context!)!.settings.name ?? "";
  } else {
    return "";
  }
}