Skip to content

Commit 97c512c

Browse files
committed
revert changes to previous commit.
1 parent 7f0e3fe commit 97c512c

File tree

4 files changed

+24
-14
lines changed

4 files changed

+24
-14
lines changed

docs/platforms/flutter/enriching-events/screenshots/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Learn more about taking screenshots when an error occurs. Sentry p
55

66
Sentry makes it possible to automatically take a screenshot and include it as an <PlatformLink to="/enriching-events/attachments/">attachment</PlatformLink> when a user experiences an error, an exception or a crash.
77

8-
This feature is only available for SDKs with a single user interface, like the ones for mobile and desktop applications. It is currently not possible to take screenshots in a `multi-view` application (it will be disabled automatically). It's also limited by whether taking a screenshot is possible or not. For example, in some environments, like native iOS, taking a screenshot requires the UI thread, which often isn't available in the event of a crash. Another example where a screenshot might not be available is when the event happens before the screen starts to load. So inherently, this feature is a best effort solution.
8+
This feature is only available for SDKs with a user interface, like the ones for mobile and desktop applications. It's also limited by whether taking a screenshot is possible or not. For example, in some environments, like native iOS, taking a screenshot requires the UI thread, which often isn't available in the event of a crash. Another example where a screenshot might not be available is when the event happens before the screen starts to load. So inherently, this feature is a best effort solution.
99

1010
## Enabling Screenshots
1111

docs/platforms/flutter/integrations/user-interaction-instrumentation.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ _(New in version 6.17.0)_
1212

1313
Enabling UI instrumentation captures transactions and adds breadcrumbs for a set of different user interactions, which include clicks, long clicks, taps, and so on.
1414

15-
`multi-view` applications are currently not supported by this feature. This feature will be disabled automatically if a `multi-view` application is recognised.
16-
1715
## Instrumentation Behaviour
1816

1917
Before diving into the configuration, it's important to understand how user interaction instrumentation behaves:

docs/platforms/flutter/troubleshooting.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,23 @@ The following features don't currently support multi-view:
7272
- User interaction integration via the `SentryUserInteractionWidget` (which is part of the `SentryWidget`)
7373
- Window and Device events via the `WidgetsBindingIntegration`
7474

75-
These features are automatically disabled if a `multi-view` application is recognised.
75+
To prevent the `WidgetsBindingIntegration` from loading by default, you'll need to remove the integration as shown below:
76+
77+
```dart
78+
// ignore: implementation_imports
79+
import 'package:sentry_flutter/src/integrations/widgets_binding_integration.dart';
80+
...
81+
SentryFlutter.init(
82+
(options) {
83+
...
84+
final integration = options.integrations
85+
.firstWhere((element) => element is WidgetsBindingIntegration);
86+
options.removeIntegration(integration);
87+
},
88+
// Init your App.
89+
appRunner: appRunner,
90+
);
91+
```
7692

7793
### Example Application
7894

includes/troubleshooting/flutter/enable_multi_view.mdx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import 'dart:async';
33
import 'package:flutter/material.dart';
44
import 'package:sentry_flutter/sentry_flutter.dart';
5+
import 'package:sentry_flutter/src/integrations/widgets_binding_integration.dart';
56
import 'dart:ui' show FlutterView;
67
78
const String exampleDsn = '___DSN___';
@@ -10,6 +11,9 @@ Future<void> main() async {
1011
await SentryFlutter.init(
1112
(options) {
1213
options.dsn = exampleDsn;
14+
final integration = options.integrations
15+
.firstWhere((element) => element is WidgetsBindingIntegration);
16+
options.removeIntegration(integration);
1317
},
1418
// Init your App.
1519
appRunner: () => runWidget(
@@ -124,16 +128,8 @@ class _MultiViewAppState extends State<MultiViewApp>
124128

125129
```js {filename:flutter_bootstrap.js}{tabTitle: web/flutter_bootstrap.js}
126130
// flutter_bootstrap.js
127-
{
128-
{
129-
flutter_js;
130-
}
131-
}
132-
{
133-
{
134-
flutter_build_config;
135-
}
136-
}
131+
{{ flutter_js; }}
132+
{{ flutter_build_config; }}
137133

138134
_flutter.loader.load({
139135
onEntrypointLoaded: async function onEntrypointLoaded(engineInitializer) {

0 commit comments

Comments
 (0)