replaceAll method

void replaceAll(
  1. List<AppRoute> replaceWith
)

Implementation

void replaceAll(List<AppRoute> replaceWith) {
  if (replaceWith.isNotEmpty) {
    _pages.clear();
    replaceWith.forEach((e) => _performPushRoute(e.fill()));
    notifyListeners();
  } else {
    _log('List of routes to replace should not be empty.');
  }
}