Skip to content

Commit 7f0e3fe

Browse files
committed
update to match the latest PR
1 parent 994c2be commit 7f0e3fe

File tree

4 files changed

+14
-25
lines changed

4 files changed

+14
-25
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 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.
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.
99

1010
## Enabling Screenshots
1111

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ _(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+
1517
## Instrumentation Behaviour
1618

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

docs/platforms/flutter/troubleshooting.mdx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,27 +72,10 @@ 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-
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-
```
75+
These features are automatically disabled if a `multi-view` application is recognised.
9276

9377
### Example Application
9478

95-
9679
Copy the `main.dart` file into the `lib` folder of your existing project. This file already contains the code of the `multi_view_app.dart` from the [`flutter documentation`](https://docs.flutter.dev/platform-integration/web/embedding-flutter-web#handling-view-changes-from-dart).
9780
Next, copy the `flutter_bootstrap.js` file and the `index.html` file into the `web` folder.
9881

includes/troubleshooting/flutter/enable_multi_view.mdx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
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';
65
import 'dart:ui' show FlutterView;
76
87
const String exampleDsn = '___DSN___';
@@ -11,9 +10,6 @@ Future<void> main() async {
1110
await SentryFlutter.init(
1211
(options) {
1312
options.dsn = exampleDsn;
14-
final integration = options.integrations
15-
.firstWhere((element) => element is WidgetsBindingIntegration);
16-
options.removeIntegration(integration);
1713
},
1814
// Init your App.
1915
appRunner: () => runWidget(
@@ -128,8 +124,16 @@ class _MultiViewAppState extends State<MultiViewApp>
128124

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

134138
_flutter.loader.load({
135139
onEntrypointLoaded: async function onEntrypointLoaded(engineInitializer) {

0 commit comments

Comments
 (0)