pushReplacement static method

Future pushReplacement(
  1. Widget child, {
  2. NavigateAnimType animationType = NavigateAnimType.leftToRight,
})

Replaces the current route with a new one with an animation.

Implementation

static Future<dynamic> pushReplacement(Widget child, {NavigateAnimType animationType = NavigateAnimType.leftToRight}) {
  return navigatorKey.currentState!.pushReplacement(_pageRouteBuilder(child, animationType: animationType));
}