popTo method

AFRouteStateSegments popTo(
  1. AFScreenID screen,
  2. dynamic childReturn
)

Remove the leaf element from the route, returning back to the parent screen.

Implementation

AFRouteStateSegments popTo(AFScreenID screen, dynamic childReturn) {
  final popCount = popCountToScreen(screen);
  return popN(popCount, childReturn);
}