cache method

void cache(
  1. Paint paint,
  2. QrCodeElement element, {
  3. FinderPatternPosition? position,
})

Save a Paint for the provided element and position into the cache.

Implementation

void cache(
  Paint paint,
  QrCodeElement element, {
  FinderPatternPosition? position,
}) {
  if (element == QrCodeElement.codePixel) {
    _pixelPaints.add(paint);
  } else {
    _keyedPaints[_cacheKey(element, position: position)] = paint;
  }
}