applyOptions static method

Future<void> applyOptions({
  1. bool maskAllTexts = false,
  2. bool maskAllImages = false,
  3. double captureScale = 1.0,
  4. List<String>? textsToMask,
})

Applies masking configuration. Called internally by CxFlutterPlugin.initializeSessionReplay from CXSessionReplayOptions — you normally do not call this directly. Set masking on the options object instead, so there is exactly one place that controls it.

Implementation

static Future<void> applyOptions({
  bool maskAllTexts = false,
  bool maskAllImages = false,
  double captureScale = 1.0,
  List<String>? textsToMask,
}) async {
  _maskAllTexts = maskAllTexts;
  _maskAllImages = maskAllImages;
  _captureScale = captureScale > 0 ? captureScale : 1.0;
  _textsToMask = textsToMask?.expand((p) {
    if (p.trim().isEmpty) return <RegExp>[];
    try {
      return [RegExp(p)];
    } on FormatException {
      return <RegExp>[];
    }
  }).toList() ?? [];

}