debugKnownRoutes method

  1. @visibleForTesting
String debugKnownRoutes()

Returns the full path of routes.

Each path is indented based depth of the hierarchy, and its name is also appended if not null

Implementation

@visibleForTesting
String debugKnownRoutes() {
  final sb = StringBuffer();
  sb.writeln('Full paths for routes:');
  _debugFullPathsFor(_routingConfig.value.routes, '', const <_DecorationType>[], sb);

  if (_nameToPath.isNotEmpty) {
    sb.writeln('known full paths for route names:');
    for (final MapEntry<String, _NamedPath> e in _nameToPath.entries) {
      sb.writeln(
        '  ${e.key} => ${e.value.path}${e.value.caseSensitive ? '' : ' (case-insensitive)'}',
      );
    }
  }

  return sb.toString();
}