createSavedWidthsKey static method

CacheKey createSavedWidthsKey(
  1. List<Level> levels,
  2. Map<Level, double>? savedWidths,
  3. double availableWidth
)

Implementation

static CacheKey createSavedWidthsKey(
  List<Level> levels,
  Map<Level, double>? savedWidths,
  double availableWidth,
) {
  final levelsStr = levels.map((l) => l.name).join(',');
  final widthsHash = savedWidths?.hashCode ?? 0;
  return CacheKey(
    cacheName: CacheNames.splitPaneSavedWidths,
    key: 'saved_${levelsStr}_w${availableWidth.round()}_s$widthsHash',
  );
}