popAndPush<T> static method

Future<T?> popAndPush<T>(
  1. BuildContext context,
  2. Widget page
)

Implementation

static Future<T?> popAndPush<T>(BuildContext context, Widget page) {
  pop(context);
  return Navigator.of(context).push(
    new CupertinoPageRoute(builder: (context) => page),
  );
}