CustomPageRouteBuilder<T> constructor
CustomPageRouteBuilder<T> ({
- required RoutePageBuilder pageBuilder,
- required PageTransitionsBuilder pageTransitionsBuilder,
Creates a custom page route builder.
The pageBuilder
parameter is required and defines the content of the
page.
The pageTransitionsBuilder
parameter is required and specifies the
custom page transition animation.
Example Usage:
final customPageRoute = CustomPageRouteBuilder(
pageBuilder: (context, animation, secondaryAnimation) => MyPage(),
pageTransitionsBuilder: MyCustomPageTransitions(),
);
Navigator.of(context).push(customPageRoute);
Implementation
CustomPageRouteBuilder({
required super.pageBuilder,
required this.pageTransitionsBuilder,
});