You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: platform-includes/enriching-events/attach-screenshots/flutter.mdx
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,32 @@ await SentryFlutter.init(
13
13
);
14
14
```
15
15
16
+
### Customize Screenshot Capturing
17
+
18
+
<Note>
19
+
20
+
Requires SDK version `8.11.0` or higher.
21
+
22
+
</Note>
23
+
24
+
Because capturing screenshots can be a resource-intensive operation on Flutter, it's limited to one screenshot every 2 seconds using a debouncing mechanism. This behavior can be overruled if you supply a `BeforeCaptureCallback` for screenshots in the `SentryFlutterOptions`.
25
+
26
+
The `BeforeCaptureCallback` also allows you to customize the behavior based on event data, so you can decide when to capture a screenshot and when not to. For example, you can decide to only capture screenshots of fatal events:
The masking feature is by default disabled for Screenshots. To enable masking, use the `options.experimental.privacy` parameter.
@@ -26,7 +52,7 @@ The masking feature is by default disabled for Screenshots. To enable masking, u
26
52
27
53
## Filtering Screenshots
28
54
29
-
You can filter your screenshots by using the `beforeScreenshot` callback, which is called before attaching a screenshot to an event. By default, the callback returns `true` which means that all screenshots are attached.
55
+
You can filter your screenshots by using the `beforeCaptureScreenshot` callback, which is called before attaching a screenshot to an event. By default, the callback returns `true` which means that all screenshots are attached.
30
56
31
57
If the callback returns `false`, the screenshot will not be attached.
0 commit comments