Docs
Hide private data
Cover areas of the screen with NabrilaMask, and what is and isn't covered.
NabrilaMask
Wrap any widget that shows private data:
NabrilaMask(child: CardNumberView())
In the screenshot and the video, each line of text in that area is wiped with the background behind it and drawn as a row of dots in the text's color and each image by a plain placeholder; the card's background, border, shadow, dividers and icons stay visible. Anything not known to be safe (CustomPaint, Texture, native views) is covered whole. Taps inside it never carry the label of what was tapped.
For hand-drawn content, NabrilaMask.solid(child: ...) covers the whole area with a single neutral gray block.
Text fields
Since version 0.3.0, the value of every text field on screen is covered by a row of dots per line, on the field's own background, in the screenshot and the video; the label, border and hint stay visible. An empty field draws nothing, and a password field always gets dots of the same width, whatever its length. The dots take the text's color, a little softer, and only show how long the line is, never its letters or the length of its words; nothing is blurred. When the SDK cannot tell what background is behind (an image, a gradient), the line is covered by an opaque bar. A tap on a field names it by the words the app's developer wrote: its label (labelText) or, without one, its hint (hintText, or a Cupertino field's placeholder). Without them it says TextField. It never carries what was typed.
What the tester covers
Before sending, the tester can also draw opaque rectangles over the screenshot to cover anything they want.
What isn't covered automatically
Masking is partial. It helps to know what it doesn't detect:
- Text inside images or
CustomPaint. Nothing detects it; wrap those widgets inNabrilaMask. - The app's plain text. Titles, buttons and ordinary text stay visible, because whoever reads the report needs to see the screen. A sensitive value in a plain
Text(a balance, a name) is visible unless you wrap it inNabrilaMask. If you'd rather the video cover all text, useNabrilaReplay(maskAllText: true)(Replay); the screenshot doesn't change, and the tester reviews it before sending. - Tap labels. A tap can carry the button's text or the label that was tapped. If that text is sensitive, wrap the widget in
NabrilaMask.
The value of a text field is never read.