popToBottomAndPushReplacement<T> method

Future<T?> popToBottomAndPushReplacement<T>(
  1. String location, {
  2. Object? extra,
})

Implementation

Future<T?> popToBottomAndPushReplacement<T>(String location,
    {Object? extra}) async {
  while (canPop()) {
    pop();
  }

  return await pushReplacement(location, extra: extra);
}