currentHierarchy method

List<HierarchySegment> currentHierarchy({
  1. bool asPath = false,
  2. bool ignorePending = false,
  3. bool ignoreParams = false,
})

Builds a simplified hierarchy of current stacks

This is meant to be used in testing to verify current hierarchy

e.g expect(router.currentHierarchy(),[ HierarchySegment(name: HomeRoute.name, children: HierarchySegment(Tab1Route.name), ), ] );

Implementation

List<HierarchySegment> currentHierarchy({
  bool asPath = false,
  bool ignorePending = false,
  bool ignoreParams = false,
}) =>
    _getCurrentHierarchy(
      stackData,
      asPath: asPath,
      ignoreParams: ignoreParams,
      ignorePending: ignorePending,
    );