|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## Unreleased |
| 4 | + |
| 5 | +### Features |
| 6 | + |
| 7 | +- Support custom `Sentry.runZoneGuarded` zone creation ([#2088](https://github.com/getsentry/sentry-dart/pull/2088)) |
| 8 | + - Sentry will not create a custom zone anymore if it is started within a custom one. |
| 9 | + - This fixes Zone miss-match errors when trying to initialize WidgetsBinding before Sentry on Flutter Web |
| 10 | + - `Sentry.runZonedGuarded` creates a zone and also captures exceptions & breadcrumbs automatically. |
| 11 | + ```dart |
| 12 | + Sentry.runZonedGuarded(() { |
| 13 | + WidgetsBinding.ensureInitialized(); |
| 14 | +
|
| 15 | + // Errors before init will not be handled by Sentry |
| 16 | +
|
| 17 | + SentryFlutter.init( |
| 18 | + (options) { |
| 19 | + ... |
| 20 | + }, |
| 21 | + appRunner: () => runApp(MyApp()), |
| 22 | + ); |
| 23 | + } (error, stackTrace) { |
| 24 | + // Automatically sends errors to Sentry, no need to do any |
| 25 | + // captureException calls on your part. |
| 26 | + // On top of that, you can do your own custom stuff in this callback. |
| 27 | + }); |
| 28 | + ``` |
| 29 | + |
3 | 30 | ## 8.11.0-beta.2
|
4 | 31 |
|
5 | 32 | ### Features
|
|
49 | 76 | });
|
50 | 77 | ```
|
51 | 78 | - Replace deprecated `BeforeScreenshotCallback` with new `BeforeCaptureCallback`.
|
52 |
| -- Support custom `Sentry.runZoneGuarded` zone creation ([#2088](https://github.com/getsentry/sentry-dart/pull/2088)) |
53 |
| - - Sentry will not create a custom zone anymore if it is started within a custom one. |
54 |
| - - This fixes Zone miss-match errors when trying to initialize WidgetsBinding before Sentry on Flutter Web |
55 |
| - - `Sentry.runZonedGuarded` creates a zone and also captures exceptions & breadcrumbs automatically. |
56 |
| - ```dart |
57 |
| - Sentry.runZonedGuarded(() { |
58 |
| - WidgetsBinding.ensureInitialized(); |
59 | 79 |
|
60 |
| - // Errors before init will not be handled by Sentry |
61 |
| -
|
62 |
| - SentryFlutter.init( |
63 |
| - (options) { |
64 |
| - ... |
65 |
| - }, |
66 |
| - appRunner: () => runApp(MyApp()), |
67 |
| - ); |
68 |
| - } (error, stackTrace) { |
69 |
| - // Automatically sends errors to Sentry, no need to do any |
70 |
| - // captureException calls on your part. |
71 |
| - // On top of that, you can do your own custom stuff in this callback. |
72 |
| - }); |
73 |
| - ``` |
74 | 80 |
|
75 | 81 | ### Fixes
|
76 | 82 |
|
|
0 commit comments