push<T> method

Future<T?> push<T>(
  1. Widget destination
)

Pushes a destination widget directly onto the stack.

Implementation

Future<T?> push<T>(Widget destination) {
  final nav = _navigatorKey.currentState;
  if (nav == null) return Future.value(null);
  return nav.push<T>(
    CupertinoPageRoute<T>(
      builder: (context) => GlassNavigationTitleScope(child: destination),
    ),
  );
}