Skip to main content

Classes and Attributes

To simplify management of privacy for mobile applications and to enable individuals who have worked with Fullstory for the web to have a more familiar experience, Fullstory for Mobile Apps instrumentation creates virtual HTML-like elements for Flutter widgets for the purposes of privacy management, funnel definition, and searches. Read more here

Wrap a widget with FSCustomAttributes to add one or more classes, or arbitrary key/value attributes, to the virtual element for that widget and its descendants. Read more about Fullstory for Mobile Apps Privacy Rules.

Pre-Configured Privacy Classes

Several pre-configured privacy classes are provided to manage privacy programmatically.

  • fs-mask
  • fs-unmask
  • fs-exclude

Convenience Widgets

FSMask, FSUnmask, and FSExclude are thin wrappers around FSCustomAttributes that apply the corresponding pre-configured privacy class above. They take the child widget as a positional argument, rather than the named child: argument used by FSCustomAttributes.

FSCustomAttributes invocationEquivalent convenience widget
FSCustomAttributes(classes: ['fs-mask'], child: widget)FSMask(widget)
FSCustomAttributes(classes: ['fs-unmask'], child: widget)FSUnmask(widget)
FSCustomAttributes(classes: ['fs-exclude'], child: widget)FSExclude(widget)

Nesting and Precedence

Classes accumulate onto a widget and its descendants. Nesting one convenience widget inside another layers the classes together, rather than the inner widget replacing the outer one:

FSUnmask(
Column(
children: [
Text('This text will be unmasked'),
FSMask(Text('This text will be masked')),
FSExclude(Text('This text will be excluded')),
],
),
),

There is no API to remove a class once it has been applied. To override a class applied by an ancestor, wrap a narrower subtree in FSCustomAttributes or a convenience widget with the class you want instead. FSMask still records events from its subtree (text and images are hidden), while FSExclude omits the entire subtree from capture.

Additional Information