maskCallback<T extends Widget> method
- @experimental
- SentryMaskingDecision shouldMask(
- Element,
- T
- String? name,
- String? description,
Provide a custom callback to decide whether to mask the widget of class
T (or subclasses of T).
Note: masking rules are called in the order they're added so if a previous
rule already makes a decision, this rule won't be called.
Implementation
@experimental
void maskCallback<T extends Widget>(
SentryMaskingDecision Function(Element, T) shouldMask,
{String? name,
String? description}) {
assert(T != SentryMask);
assert(T != SentryUnmask);
_userMaskingRules.add(SentryMaskingCustomRule<T>(
callback: shouldMask,
name: name ?? T.toString(),
description:
description ?? 'Custom callback-based rule (description unspecified)',
));
}