to static method

Future to(
  1. Widget page, {
  2. NavType? type,
  3. Widget? childCurrent,
  4. BuildContext? ctx,
  5. bool inheritTheme = false,
  6. Curve curve = Curves.linear,
  7. Alignment? alignment,
  8. Duration duration = const Duration(milliseconds: 300),
  9. Duration reverseDuration = const Duration(milliseconds: 300),
  10. bool fullscreenDialog = false,
  11. bool opaque = false,
})

Navigation

Grock.to(
 HomeScreen(),
 type: NavType.fade,
 curve: Curves.easeInOut,
 duration: Duration(milliseconds: 600),
 reverseDuration: Duration(milliseconds: 600),
 fullscreenDialog: false,
);

Implementation

static Future to(
  Widget page, {
  NavType? type,
  Widget? childCurrent,
  BuildContext? ctx,
  bool inheritTheme = false,
  Curve curve = Curves.linear,
  Alignment? alignment,
  Duration duration = const Duration(milliseconds: 300),
  Duration reverseDuration = const Duration(milliseconds: 300),
  bool fullscreenDialog = false,
  bool opaque = false,
}) {
  log("Navigation to $page", name: "Grock");
  return GrockNavigationService.to(page,
          type: type,
          childCurrent: childCurrent,
          ctx: ctx,
          inheritTheme: inheritTheme,
          curve: curve,
          alignment: alignment,
          duration: duration,
          reverseDuration: reverseDuration,
          fullscreenDialog: fullscreenDialog,
          opaque: opaque)
      .catchError((err) {
    log("$err", name: "Grock.to($page) error!", error: err);
  });
}