minQrInkContrast top-level constant

double const minQrInkContrast

A scannable QR tile shared by the receive screen and the IntoZec deposit screen (the wallet's two "show this code to scan" surfaces).

It pins a white tile — a QR-scanner requirement, NOT a theme token (flutter-patterns allows a documented functional pin) — with a ≥4-module quiet zone (the 24px padding at the default 240dp size). The dark modules are the host's WalletColors.qrInk (FR-49 W-10; default black), but only while that ink keeps minQrInkContrast against the white tile: a scanner binarises on luminance, and a code that fails to scan is an address nobody can pay. A paler ink falls back to black. The whole tile is one image Semantics node labelled by label, and the QR's own internal semantics are excluded so a screen reader doesn't announce it twice.

Money-correctness: the inner QrImageView carries a ValueKey(payload) so a widget test can pin the EXACT payload the QR encodes (a dropped character would send funds nowhere) even though QrImageView hides its data. Pass tileKey to identify the outer tile from a test (each call site keeps its own stable key). The least contrast a host's QR ink must keep on the white tile before the tile uses it (WCAG enhanced, 7:1). Black is 21:1; the refreshed design's #0F3D27 is 12.6:1.

Implementation

const double minQrInkContrast = 7.0;