replaceRouteBelow<T extends Object?> method

void replaceRouteBelow<T extends Object?>({
  1. required Widget anchor,
  2. required Widget to,
  3. QuickTransition? transitions,
})

A method that replaces the route below the current one with a new one with the given child widget and transition type. It also preserves the type parameter of the route below the current one.

Defines the available transition options for animations. Only one transition can be selected at a time.

Available transitions:

The default transition is QuickFade.

Implementation

void replaceRouteBelow<T extends Object?>({
  required Widget anchor,
  required Widget to,
  QuickTransition? transitions,
}) {
  return Navigator.of(this).replaceRouteBelow<T>(
    anchorRoute: QuickRouter.builder(anchor, transitions),
    newRoute: QuickRouter.builder<T>(to, transitions),
  );
}