NavAndRemove function

Future NavAndRemove({
  1. dynamic screen,
  2. dynamic ctx,
})

Implementation

Future NavAndRemove ({screen , ctx}) {
  return  Navigator.pushAndRemoveUntil(ctx, MaterialPageRoute(builder:  (ctx) => screen,), (route) => false);
}