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