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;
  }
}