name property

String name

Implementation

String get name {
  // If no path was specified in the route, then it is a relative route
  // that should have a name relative to the current path.
  if (uri.path.isEmpty) {
    return Uri(
      path: Uri.base.path,
      queryParameters: uri.queryParameters,
    ).pathWithQuery;
  }

  return uri.pathWithQuery;
}