paints method

List<Paint?> paints(
  1. QRCodeElement element, {
  2. FinderPatternPosition? position,
})

Retrieve all Paint objects from the paint cache for the provided element and position. Note: Finder pattern elements can only have a max one Paint object per position. As such they will always return a List with a fixed size of 1.

Implementation

List<Paint?> paints(
  QRCodeElement element, {
  FinderPatternPosition? position,
}) {
  return element == QRCodeElement.codePixel
      ? _pixelPaints
      : <Paint?>[_keyedPaints[_cacheKey(element, position: position)]];
}