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