to function

void to(
  1. Widget page
)

Navigate to a page.

Example:

to(SecondPage());

Implementation

void to(
  Widget page,
) {
  Navigator.of(Utils.navigatorKey.currentContext!)
      .push(MaterialPageRoute(builder: (context) => page));
}