finishToRoot method
void
finishToRoot()
销毁页面到根页面
Implementation
void finishToRoot() {
var routes = CloudRouteObserver.instance.getAllRoutes();
if (routes.isEmptyList) {
return;
}
var rootNames = rootRouteNames();
routes.forEach((element) {
if (!rootNames.contains(element.settings.name)) {
CloudRouteObserver.instance.navigator?.removeRoute(element);
}
});
}