push static method
Future
push(
- String path, {
- Object? arguments,
- TransitionType transitionType = TransitionType.fromRight,
push page Navigates to a new route in the application.
path The route path to navigate to.
arguments Optional data to pass to the new route.
transitionType Animation type for the transition (defaults to sliding from right).
Returns a Future that completes when the pushed route is popped.
Implementation
static Future<dynamic> push(
String path, {
Object? arguments,
TransitionType transitionType = TransitionType.fromRight,
}) {
return Navigator.of(HbRouter.key.currentContext!).pushNamed(
path,
arguments: PageConfig(
transitionType: transitionType,
arguments: arguments,
),
);
}