popAndPushNamed function

Future<Object?> popAndPushNamed(
  1. BuildContext context,
  2. String routeName
)

Implementation

Future<Object?> popAndPushNamed(BuildContext context, String routeName) {
  if (!isNavMounted(context)) {
    throw "Navigator is unmounted";
  }
  return Navigator.popAndPushNamed(context, routeName);
}