showScreenEnd method
Implementation
AFRouteState showScreenEnd(AFScreenID screenId) {
// the screen must be showing, so look up its type based on its screen id.
var uiType;
for(final show in showingScreens.values) {
if(show.hasScreenId(screenId)) {
uiType = show.kind;
break;
}
}
if(uiType == null) {
assert(false, "ending a screen that wasn't showing?");
return this;
}
final revised = Map<AFUIType, AFRouteStateShowScreen>.from(showingScreens);
revised[uiType] = AFRouteState.showScreenUnused;
return copyWith(showScreen: revised);
}