insert method

Future<void> insert(
  1. PageRouteInfo<Object?> route, {
  2. int index = 0,
  3. OnNavigationFailure? onFailure,
})
inherited

Inserts the corresponding page to given route to the _pages stack

if onFailure callback is provided, navigation errors will be passed to it otherwise they'll be thrown

Implementation

Future<void> insert(PageRouteInfo route, {int index = 0, OnNavigationFailure? onFailure}) {
  return _findStackScope(route)._push(route, onFailure: onFailure, insertAt: index);
}