push static method

void push(
  1. BuildContext context,
  2. Widget page
)

Pushes a new page onto the navigation stack.

This is equivalent to calling NavPages.of(context).push(page). The new page becomes the current page and can be popped later.

Example:

NavPages.push(context, AnotherPage());

Implementation

static void push(BuildContext context, Widget page) {
  of(context).push(page);
}