PostHogSessionReplayConfig class

Configuration for mobile session replay capture and masking.

Assign an instance to PostHogConfig.sessionReplayConfig before calling Posthog().setup(config).

Constructors

PostHogSessionReplayConfig()
Creates a session replay configuration with default masking enabled.

Properties

captureNativeScreens ↔ bool
Capture native screens that cover the Flutter UI (full-screen paywalls, presented view controllers, native activities) via the native replay SDK, so they appear in replay instead of a frozen Flutter frame. When enabled and a detected screen cannot be captured, a single black placeholder frame is sent instead; if that also fails, replay keeps showing the last Flutter frame. With this flag off there is no placeholder — nothing about replay changes.
getter/setter pair
captureTouches ↔ bool
Capture touch coordinates in session replay on Android and iOS.
getter/setter pair
debouncerDelay ← Duration
Deprecated setter that forwards assigned values to throttleDelay.
no getter
hashCode → int
The hash code for this object.
no setterinherited
maskAllImages ↔ bool
Enable masking of all images. Default: true. PostHogUnmaskWidget can reveal known-safe Flutter images; it overrides explicit masks within the same subtree too. Flutter web requires canvas masking to be enabled as described in maskAllTexts.
getter/setter pair
maskAllPlatformViews ↔ bool
Mask all platform views (WebView, Maps, etc.) in session replay.
getter/setter pair
maskAllTexts ↔ bool
Enable masking of all text and text input fields. Default: true. Wrap known-safe Flutter content in PostHogUnmaskWidget to reveal it without disabling masking globally.
getter/setter pair
maskCustomPaint ↔ bool
Mask the full bounds of CustomPaint widgets with a painter or foregroundPainter, including their children. Default: false.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleRate ↔ double?
Session replay sample rate between 0 and 1. Local config has precedence over remote config when both are set. If null, sampling is controlled by remote config (when available).
getter/setter pair
screenshotColorMode ↔ PostHogScreenshotColorMode
Pixel format for Android native-screen captures.
getter/setter pair
screenshotCompressionQuality ↔ int
Compression quality for Android replay screenshots.
getter/setter pair
screenshotScale ↔ double?
Multiplier for the width and height of Android replay screenshots.
getter/setter pair
textMaskPolicy ↔ PostHogTextMaskPolicy?
Decides, per text node, what to mask — instead of all-or-nothing.
getter/setter pair
throttleDelay ↔ Duration
Throttling delay used to reduce the number of snapshots captured and reduce performance impact.
getter/setter pair
verifyScreenshotMaskAlignment ↔ bool
Verify that masks remain aligned while capturing session replay screenshots.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
Converts this session replay configuration to a platform-channel map.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited