Skip to content

Commit cae0d8c

Browse files
committed
bump disposebag
1 parent dffca06 commit cae0d8c

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

lib/src/disposebag_mixin.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import 'package:meta/meta.dart';
77
/// A mixin that provides the [DisposeBag] that helps disposing Streams and closing Sinks.
88
@optionalTypeArgs
99
mixin DisposeBagMixin<T extends StatefulWidget> on State<T> {
10-
Completer<bool>? _mockBagDisposed;
10+
Completer<void>? _mockBagDisposed;
1111

1212
/// Set mock [DisposeBag] for testing purpose.
1313
/// Returns a [Future] that completes when [DisposeBag.dispose] completes.
1414
@visibleForTesting
15-
Future<bool> setMockBag(DisposeBag bag) {
15+
Future<void> setMockBag(DisposeBag bag) {
1616
_bag = bag;
17-
return (_mockBagDisposed = Completer<bool>()).future;
17+
return (_mockBagDisposed = Completer<void>()).future;
1818
}
1919

2020
//
@@ -29,7 +29,7 @@ mixin DisposeBagMixin<T extends StatefulWidget> on State<T> {
2929
if (!mounted) {
3030
throw StateError('Invalid when getting bag after disposed.');
3131
}
32-
return _bag ??= DisposeBag();
32+
return _bag ??= DisposeBag(const <Object>[], toStringShort());
3333
}
3434

3535
@override

pubspec.lock

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,56 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.5.0-nullsafety.3"
10+
version: "2.5.0"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
1414
name: boolean_selector
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "2.1.0-nullsafety.3"
17+
version: "2.1.0"
1818
characters:
1919
dependency: transitive
2020
description:
2121
name: characters
2222
url: "https://pub.dartlang.org"
2323
source: hosted
24-
version: "1.1.0-nullsafety.5"
24+
version: "1.1.0"
2525
charcode:
2626
dependency: transitive
2727
description:
2828
name: charcode
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "1.2.0-nullsafety.3"
31+
version: "1.2.0"
3232
clock:
3333
dependency: transitive
3434
description:
3535
name: clock
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "1.1.0-nullsafety.3"
38+
version: "1.1.0"
3939
collection:
4040
dependency: transitive
4141
description:
4242
name: collection
4343
url: "https://pub.dartlang.org"
4444
source: hosted
45-
version: "1.15.0-nullsafety.5"
45+
version: "1.15.0"
4646
disposebag:
4747
dependency: "direct main"
4848
description:
4949
name: disposebag
5050
url: "https://pub.dartlang.org"
5151
source: hosted
52-
version: "1.5.0-nullsafety.0"
52+
version: "1.5.0-nullsafety.1"
5353
fake_async:
5454
dependency: transitive
5555
description:
5656
name: fake_async
5757
url: "https://pub.dartlang.org"
5858
source: hosted
59-
version: "1.2.0-nullsafety.3"
59+
version: "1.2.0"
6060
flutter:
6161
dependency: "direct main"
6262
description: flutter
@@ -73,21 +73,21 @@ packages:
7373
name: matcher
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "0.12.10-nullsafety.3"
76+
version: "0.12.10"
7777
meta:
7878
dependency: "direct main"
7979
description:
8080
name: meta
8181
url: "https://pub.dartlang.org"
8282
source: hosted
83-
version: "1.3.0-nullsafety.6"
83+
version: "1.3.0"
8484
path:
8585
dependency: transitive
8686
description:
8787
name: path
8888
url: "https://pub.dartlang.org"
8989
source: hosted
90-
version: "1.8.0-nullsafety.3"
90+
version: "1.8.0"
9191
sky_engine:
9292
dependency: transitive
9393
description: flutter
@@ -99,55 +99,55 @@ packages:
9999
name: source_span
100100
url: "https://pub.dartlang.org"
101101
source: hosted
102-
version: "1.8.0-nullsafety.4"
102+
version: "1.8.0"
103103
stack_trace:
104104
dependency: transitive
105105
description:
106106
name: stack_trace
107107
url: "https://pub.dartlang.org"
108108
source: hosted
109-
version: "1.10.0-nullsafety.6"
109+
version: "1.10.0"
110110
stream_channel:
111111
dependency: transitive
112112
description:
113113
name: stream_channel
114114
url: "https://pub.dartlang.org"
115115
source: hosted
116-
version: "2.1.0-nullsafety.3"
116+
version: "2.1.0"
117117
string_scanner:
118118
dependency: transitive
119119
description:
120120
name: string_scanner
121121
url: "https://pub.dartlang.org"
122122
source: hosted
123-
version: "1.1.0-nullsafety.3"
123+
version: "1.1.0"
124124
term_glyph:
125125
dependency: transitive
126126
description:
127127
name: term_glyph
128128
url: "https://pub.dartlang.org"
129129
source: hosted
130-
version: "1.2.0-nullsafety.3"
130+
version: "1.2.0"
131131
test_api:
132132
dependency: transitive
133133
description:
134134
name: test_api
135135
url: "https://pub.dartlang.org"
136136
source: hosted
137-
version: "0.2.19-nullsafety.6"
137+
version: "0.2.19"
138138
typed_data:
139139
dependency: transitive
140140
description:
141141
name: typed_data
142142
url: "https://pub.dartlang.org"
143143
source: hosted
144-
version: "1.3.0-nullsafety.5"
144+
version: "1.3.0"
145145
vector_math:
146146
dependency: transitive
147147
description:
148148
name: vector_math
149149
url: "https://pub.dartlang.org"
150150
source: hosted
151-
version: "2.1.0-nullsafety.5"
151+
version: "2.1.0"
152152
sdks:
153153
dart: ">=2.12.0-0.0 <3.0.0"

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ environment:
1010
sdk: '>=2.12.0-0 <3.0.0'
1111

1212
dependencies:
13-
meta: ^1.1.6
14-
disposebag: ^1.5.0-nullsafety.0
13+
meta: ^1.3.0
14+
disposebag: ^1.5.0-nullsafety.1
1515
flutter:
1616
sdk: flutter
1717

test/flutter_disposebag_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class MyWidget extends StatefulWidget {
1717
}
1818

1919
class _MyWidgetState extends State<MyWidget> with DisposeBagMixin {
20-
late Future<bool> disposed;
20+
late Future<void> disposed;
2121

2222
@override
2323
void initState() {

0 commit comments

Comments
 (0)