popToRoot function

void popToRoot(
  1. BuildContext context
)

Implementation

void popToRoot(BuildContext context) {
  Navigator.of(context).popUntil((route) => route.isFirst);
}