Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Dec 12, 2024
1 parent 290b44b commit ada971f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ Future<void> main() async {
config.sessionReplay = true;
config.sessionReplayConfig.maskAllTexts = false;
config.sessionReplayConfig.maskAllImages = false;
config.sessionReplayConfig.throttleDelay =
const Duration(milliseconds: 1000);
config.sessionReplayConfig.throttleDelay = const Duration(milliseconds: 1000);
config.flushAt = 1;
await Posthog().setup(config);

Expand Down
6 changes: 5 additions & 1 deletion lib/src/posthog_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,15 @@ class PostHogSessionReplayConfig {
var maskAllImages = true;

/// Note: Deprecated in favor of [throttleDelay] from v4.8.0.
/// The value assigned to this var will be forwarded to [throttleDelay]
///
/// Debouncer delay used to reduce the number of snapshots captured and reduce performance impact.
/// This is used for capturing the view as a screenshot.
/// The lower the number, the more snapshots will be captured but higher the performance impact.
/// Defaults to 1s.
var debouncerDelay = const Duration(seconds: 1);
set debouncerDelay(Duration debouncerDelay) {
throttleDelay = debouncerDelay;
}

/// Debouncer delay used to reduce the number of snapshots captured and reduce performance impact.
/// This is used for capturing the view as a screenshot.
Expand Down

0 comments on commit ada971f

Please sign in to comment.