closeAndStartActivity function

dynamic closeAndStartActivity(
  1. BuildContext context,
  2. Widget screen
)

Implementation

closeAndStartActivity(BuildContext context, Widget screen) {
  Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => screen), (Route<dynamic> route) => false);
}