stopsByContainer property

Map<String, List<CaretStop>> get stopsByContainer

Implementation

Map<String, List<CaretStop>> get stopsByContainer {
  if (_cachedStopsByContainer != null) return _cachedStopsByContainer!;
  final map = <String, List<CaretStop>>{};
  for (final stop in caretStops) {
    final cid = findLogicalContainerId(stop.fragmentId);
    if (cid != null) {
      map.putIfAbsent(cid, () => []).add(stop);
    }
  }
  return _cachedStopsByContainer = map;
}