File tree 8 files changed +18
-14
lines changed
8 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 31
31
fail-fast : false
32
32
matrix :
33
33
os : [ubuntu-latest, windows-latest, macos-latest]
34
- # removing beta because of Dart 2.19.0
35
34
sdk : [stable]
36
35
steps :
37
36
- uses : dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## Unreleased
4
+
5
+ ### Breaking Changes:
6
+
7
+ - sentry_file now requires Dart >= 2.19 ([ #1240 ] ( https://github.com/getsentry/sentry-dart/pull/1240 ) )
8
+
3
9
## 6.18.3
4
10
5
11
### Fixes
Original file line number Diff line number Diff line change @@ -53,17 +53,17 @@ class SentryFile implements File {
53
53
}
54
54
55
55
@override
56
- Future <File > create ({bool recursive = false }) {
56
+ Future <File > create ({bool recursive = false , bool exclusive = false }) {
57
57
return _wrap (
58
- () async => _file.create (recursive: recursive),
58
+ () async => _file.create (recursive: recursive, exclusive : exclusive ),
59
59
'file.write' ,
60
60
);
61
61
}
62
62
63
63
@override
64
- void createSync ({bool recursive = false }) {
64
+ void createSync ({bool recursive = false , bool exclusive = false }) {
65
65
return _wrapSync (
66
- () => _file.createSync (recursive: recursive),
66
+ () => _file.createSync (recursive: recursive, exclusive : exclusive ),
67
67
'file.write' ,
68
68
);
69
69
}
Original file line number Diff line number Diff line change @@ -6,8 +6,7 @@ repository: https://github.com/getsentry/sentry-dart
6
6
issue_tracker : https://github.com/getsentry/sentry-dart/issues
7
7
8
8
environment :
9
- # <2.19 because of https://github.com/dart-lang/sdk/issues/49647 breaking change
10
- sdk : ' >=2.12.0 <2.19.0'
9
+ sdk : ' >=2.19.0 <3.0.0'
11
10
12
11
dependencies :
13
12
sentry : 6.18.3
Original file line number Diff line number Diff line change @@ -330,6 +330,7 @@ class MainScaffold extends StatelessWidget {
330
330
ElevatedButton (
331
331
onPressed: () async {
332
332
final id = await Sentry .captureMessage ('UserFeedback' );
333
+ // ignore: use_build_context_synchronously
333
334
await showDialog (
334
335
context: context,
335
336
builder: (context) {
@@ -547,6 +548,7 @@ Future<void> makeWebRequest(BuildContext context) async {
547
548
548
549
await transaction.finish (status: const SpanStatus .ok ());
549
550
551
+ // ignore: use_build_context_synchronously
550
552
await showDialog <void >(
551
553
context: context,
552
554
// gets tracked if using SentryNavigatorObserver
@@ -601,6 +603,7 @@ Future<void> makeWebRequestWithDio(BuildContext context) async {
601
603
await span.finish ();
602
604
}
603
605
606
+ // ignore: use_build_context_synchronously
604
607
await showDialog <void >(
605
608
context: context,
606
609
// gets tracked if using SentryNavigatorObserver
@@ -633,6 +636,7 @@ Future<void> showDialogWithTextAndImage(BuildContext context) async {
633
636
);
634
637
final text =
635
638
await DefaultAssetBundle .of (context).loadString ('assets/lorem-ipsum.txt' );
639
+ // ignore: use_build_context_synchronously
636
640
await showDialog <void >(
637
641
context: context,
638
642
// gets tracked if using SentryNavigatorObserver
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class _UserFeedbackDialogState extends State<UserFeedbackDialog> {
34
34
Text (
35
35
"It looks like we're having some internal issues." ,
36
36
textAlign: TextAlign .center,
37
+ // ignore: deprecated_member_use
37
38
style: Theme .of (context).textTheme.headline6,
38
39
),
39
40
const SizedBox (height: 4 ),
@@ -43,6 +44,7 @@ class _UserFeedbackDialogState extends State<UserFeedbackDialog> {
43
44
textAlign: TextAlign .center,
44
45
style: Theme .of (context)
45
46
.textTheme
47
+ // ignore: deprecated_member_use
46
48
.subtitle1
47
49
? .copyWith (color: Colors .grey),
48
50
),
Original file line number Diff line number Diff line change @@ -5,11 +5,9 @@ import 'dart:io' if (dart.library.html) 'dart:html';
5
5
import 'package:logging/logging.dart' ;
6
6
import 'package:dio/dio.dart' ;
7
7
8
- import 'package:sentry/sentry.dart' ;
9
8
import 'package:sentry_flutter/sentry_flutter.dart' ;
10
9
import 'package:sentry_dio/sentry_dio.dart' ;
11
10
import 'package:sentry_logging/sentry_logging.dart' ;
12
- import 'package:sentry_file/sentry_file.dart' ;
13
11
14
12
// ATTENTION: Change the DSN below with your own to see the events in Sentry. Get one at sentry.io
15
13
const String _exampleDsn =
@@ -116,9 +114,8 @@ class _MyHomePageState extends State<MyHomePage> {
116
114
117
115
try {
118
116
final file = File ('response.txt' );
119
- final sentryFile = file.sentryTrace ();
120
117
final response = await dio.get <String >('https://flutter.dev/' );
121
- await sentryFile .writeAsString (response.data ?? 'no response' );
118
+ await file .writeAsString (response.data ?? 'no response' );
122
119
123
120
await transaction.finish (status: SpanStatus .ok ());
124
121
} catch (exception, stackTrace) {
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ dependencies:
34
34
sentry_flutter :
35
35
sentry_dio :
36
36
sentry_logging :
37
- sentry_file :
38
37
dio : ^4.0.0
39
38
logging : ^1.0.0
40
39
@@ -53,8 +52,6 @@ dependency_overrides:
53
52
path : ../dio
54
53
sentry_logging :
55
54
path : ../logging
56
- sentry_file :
57
- path : ../file
58
55
59
56
# For information on the generic Dart part of this file, see the
60
57
# following page: https://dart.dev/tools/pub/pubspec
You can’t perform that action at this time.
0 commit comments