navigateTo static method

Future navigateTo(
  1. Widget page
)

Navigates to a new page by pushing it onto the navigation stack.

Returns a Future that completes when the pushed route is popped.

Implementation

static Future<dynamic> navigateTo(Widget page) {
  return navigatorKey.currentState!.push(_materialPageRoute(page));
}