pushCorner static method
void
pushCorner({
- required BuildContext context,
- Corner corner = Corner.bottomLeft,
- required Widget nextPage,
- Duration duration = const Duration(milliseconds: 500),
Pushes a new page onto the navigation stack with a corner transition animation.
The nextPage parameter is the widget that will be displayed on the new page.
The corner parameter specifies the corner of the screen where the new page will appear, with a default of Corner.bottomLeft.
The duration parameter specifies the duration of the animation, with a default of 500 milliseconds.
This method uses the CornerPageRoute class to create the custom transition animation.
Implementation
static void pushCorner({
required BuildContext context,
Corner corner = Corner.bottomLeft,
required Widget nextPage,
Duration duration = const Duration(milliseconds: 500),
}) {
Navigator.push(
context,
CornerPageRoute(
nextPage: nextPage,
currentPage: context.widget,
animationDuration: duration,
corner: corner,
),
);
}