setGlobalPoolParam method

AFRouteState setGlobalPoolParam(
  1. AFID screen,
  2. AFRouteSegment revisedSeg
)

Replaces the data on the current leaf element without changing the segments in the route.

Implementation

AFRouteState setGlobalPoolParam(AFID screen, AFRouteSegment revisedSeg) {
  final revised = Map<AFID, AFRouteSegment>.from(globalPool);
  revised[screen] = revisedSeg;
  return copyWith(globalPool: revised);
}