pushFromTop<T> static method

Future<T?> pushFromTop<T>(
  1. Widget screen, {
  2. BuildContext? context,
})

Push screen from top to bottom

If you provide context, you can nest navigate in your specific context

Implementation

static Future<T?> pushFromTop<T>(Widget screen,
        {BuildContext? context}) async =>
    navigatorState(context)?.push(
      SlideFromTopRoute(screen),
    );