popToFirst function
Pop to first screen of the navigator stack
Implementation
void popToFirst(BuildContext context) {
Navigator.of(context).popUntil((_) => _.isFirst);
}
Pop to first screen of the navigator stack
void popToFirst(BuildContext context) {
Navigator.of(context).popUntil((_) => _.isFirst);
}