createLayoutKey static method

CacheKey createLayoutKey({
  1. required double width,
  2. required int depth,
  3. required String path,
})

Implementation

static CacheKey createLayoutKey({
  required double width,
  required int depth,
  required String path,
}) {
  final q = PathUtils.quantizeWidth(width);
  final normalized = PathUtils.normalizeForCache(path);
  return CacheKey(
    cacheName: CacheNames.layout,
    key: '${createPathPrefix(path)}w${q}_d${depth}_p${normalized.hashCode}',
  );
}