resolveFullPath static method

void resolveFullPath(
  1. NPage current,
  2. bool relative,
  3. int index
)

Implementation

static void resolveFullPath(NPage current, bool relative, int index) {
  for (var page in current.pages) {
    String name = page.path;
    if (relative) {
      var parentPath = current.fullPath;

      if (parentPath == '/') {
        parentPath = '';
      }
      if (!name.startsWith('/')) {
        name = '/$name';
      }

      name = '$parentPath$name';
    }

    page._fullPath = name;
    page._index = index;
    index += 1;

    NPage._fullPathToRegExg(page);

    resolveFullPath(page, relative, index);
  }
}