firstPaint method

Paint? firstPaint(
  1. QrCodeElement element, {
  2. FinderPatternPosition? position,
})

Retrieve the first Paint object from the paint cache for the provided element and position.

Implementation

Paint? firstPaint(QrCodeElement element, {FinderPatternPosition? position}) {
  return element == QrCodeElement.codePixel
      ? _pixelPaints.first
      : _keyedPaints[_cacheKey(element, position: position)];
}