pushAndRemoveUntil method

dynamic pushAndRemoveUntil(
  1. BuildContext context,
  2. Widget page
)

Implementation

pushAndRemoveUntil(BuildContext context, Widget page) {
  try {
    Navigator.of(context).pushAndRemoveUntil(
      MaterialPageRoute(
        builder: (context) {
          return page;
        },
      ),
      (route) => false,
    );
  } catch (e) {}
}