offAll method

dynamic offAll(
  1. Route route
)

close all the route and open one

Implementation

offAll(Route route) {
  Navigator.of(this).pushReplacement(route);
}