popUntilRoot<T> static method

dynamic popUntilRoot<T>([
  1. T? result
])

Implementation

static popUntilRoot<T>([T? result]) {
  BuildContext? context = OdinApp.get().getCurrentContext();

  if (context == null) {
    return;
  }

  if (!canPop()) {
    return;
  }

  pop<T>(result);

  popUntilRoot<T>(result);
}