Skip to content

Commit 0a9d684

Browse files
committed
updat formatting
1 parent 7833bab commit 0a9d684

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
```dart
2-
import 'package:sentry/sentry.dart';
3-
4-
Sentry.init((options) => {
5-
options.tracesSampleRate = 0.2,
6-
});
2+
Sentry.init(
3+
(options) {
4+
options.tracesSampleRate = 0.2;
5+
},
6+
);
77
```

platform-includes/set-fingerprint/rpc/flutter.mdx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ class MyRpcException implements Exception {
66
MyRpcException(this.function, this.httpStatusCode);
77
}
88
9-
await SentryFlutter.init((options) {
10-
options.beforeSend = (event, hint) {
11-
if (event.throwable is MyRpcException) {
12-
final exception = event.throwable as MyRpcException;
13-
event = event.copyWith(fingerprint: [
14-
'{{ default }}',
15-
exception.function,
16-
exception.httpStatusCode.toString(),
17-
]);
18-
}
19-
return event;
20-
};
21-
};
9+
await SentryFlutter.init(
10+
(options) {
11+
options.beforeSend = (event, hint) {
12+
if (event.throwable is MyRpcException) {
13+
final exception = event.throwable as MyRpcException;
14+
event = event.copyWith(fingerprint: [
15+
'{{ default }}',
16+
exception.function,
17+
exception.httpStatusCode.toString(),
18+
]);
19+
}
20+
return event;
21+
};
22+
},
23+
);
2224
```

platform-includes/user-feedback/sdk-api-example/flutter.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
// Option 1: Retrieving SentryId from beforeSend
33
SentryId sentryId = SentryId.empty();
44
5-
await SentryFlutter.init((options) {
6-
options.beforeSend = (event, hint) {
7-
sentryId = event.eventId;
8-
return event;
9-
};
10-
});
5+
await SentryFlutter.init(
6+
(options) {
7+
options.beforeSend = (event, hint) {
8+
sentryId = event.eventId;
9+
return event;
10+
};
11+
},
12+
);
1113
1214
// Option 2: Retrieving SentryId from the method capturing the event
1315
SentryId sentryId = Sentry.captureMessage("My message");

0 commit comments

Comments
 (0)