Privacy helpers
Mask sensitive elements, leave them out of session replays, and give elements a stable ID that targeting can rely on.
Privacy helpers control how an element of your interface appears in session replays. Use them on content the workspace settings do not hide already: a card number in a custom field, a block with personal details, an account balance.
The privacy level an admin sets for the workspace decides what replays hide automatically, see Protect privacy in session replays. The helpers hide more, whatever that level.
There are three helpers:
- Mask text: the element stays in the replay, its text is hidden.
- No capture: the element and its children are left out of the replay.
- Stable ID: the element gets an ID that survives redesigns, so the element targeting of in-app messages and product tours keeps finding it. Use a snake_case name that says what the element is, not where it sits (
checkout_button), and keep it the same across releases.
import 'package:flutter/material.dart';import 'package:plugin_screeb/plugin_screeb.dart';
class CheckoutForm extends StatelessWidget { const CheckoutForm({super.key, required this.address, required this.onCheckout});
final String address; final VoidCallback onCheckout;
@override Widget build(BuildContext context) { return Column( children: [ const ScreebMaskText(child: TextField(decoration: InputDecoration(labelText: 'Card number'))), ScreebNoCapture(child: Text(address)), ScreebId('checkout_button', child: ElevatedButton(onPressed: onCheckout, child: const Text('Checkout'))), ], ); }}On mobile, a masked view shows as a gray block, its children included. Screeb also masks, without any helper, secure text fields and the views whose accessibility identifier, accessibility label, content description or resource name contains a sensitive word such as password, cvv, card, ssn or pin. In Flutter, a native view embedded with a PlatformView takes the iOS or Android helper on the underlying view.