@@ -25,13 +25,13 @@ void main() {
25
25
26
26
await expectLater (
27
27
inputActions.transform (
28
- ReduxStoreStreamTransformer (
28
+ ReduxStoreStreamTransformer < String , String > (
29
29
initialStateSupplier: () => 'InitialState' ,
30
30
sideEffects: [sideEffect1, sideEffect2],
31
31
reducer: (currentState, action) => action,
32
32
),
33
33
),
34
- emitsInOrder ([
34
+ emitsInOrder (< dynamic > [
35
35
'InitialState' ,
36
36
'InputAction1' ,
37
37
'InputAction1SideEffect1' ,
@@ -55,7 +55,7 @@ void main() {
55
55
),
56
56
),
57
57
emitsInOrder (
58
- [
58
+ < dynamic > [
59
59
'InitialState' ,
60
60
emitsDone,
61
61
],
@@ -76,7 +76,7 @@ void main() {
76
76
),
77
77
),
78
78
emitsInOrder (
79
- [
79
+ < dynamic > [
80
80
'InitialState' ,
81
81
emitsError (
82
82
const TypeMatcher <String >()
@@ -110,7 +110,7 @@ void main() {
110
110
reducer: (currentState, action) => currentState + action,
111
111
),
112
112
),
113
- emitsInOrder ([
113
+ emitsInOrder (< String > [
114
114
'Initial' ,
115
115
'Initial' 'Action1' ,
116
116
'Initial' 'Action1' 'Action2' ,
@@ -136,7 +136,7 @@ void main() {
136
136
),
137
137
),
138
138
emitsInOrder (
139
- [
139
+ < dynamic > [
140
140
'Initial' ,
141
141
emitsError (
142
142
const TypeMatcher <ReducerException >()
@@ -185,7 +185,7 @@ void main() {
185
185
expect (
186
186
stateStream,
187
187
emitsInOrder (
188
- [
188
+ < String > [
189
189
'0' ,
190
190
'0-1' ,
191
191
'0-1-2' ,
@@ -203,7 +203,7 @@ void main() {
203
203
'Disposing reduxStore disposes all side effects and upstream' ,
204
204
() async {
205
205
var disposedSideffectsCount = 0 ;
206
- var outputedError;
206
+ dynamic outputedError;
207
207
var outputCompleted = false ;
208
208
209
209
final dummyAction = 'SomeAction' ;
@@ -234,24 +234,24 @@ void main() {
234
234
)
235
235
.listen (
236
236
outputedStates.add,
237
- onError: (e, s) => outputedError = e,
237
+ onError: (dynamic e, StackTrace s) => outputedError = e,
238
238
onDone: () => outputCompleted = true ,
239
239
);
240
240
241
241
// I know it's bad, but it does the job
242
- await Future .delayed (const Duration (milliseconds: 100 ));
242
+ await Future < void > .delayed (const Duration (milliseconds: 100 ));
243
243
244
244
// Trigger some action
245
245
upstream.add (dummyAction);
246
246
247
247
// I know it's bad, but it does the job
248
- await Future .delayed (const Duration (milliseconds: 100 ));
248
+ await Future < void > .delayed (const Duration (milliseconds: 100 ));
249
249
250
250
// Dispose the whole cain
251
251
await subscription.cancel ();
252
252
253
253
// I know it's bad, but it does the job
254
- await Future .delayed (const Duration (milliseconds: 500 ));
254
+ await Future < void > .delayed (const Duration (milliseconds: 500 ));
255
255
256
256
// Verify everything is fine
257
257
expect (disposedSideffectsCount, 2 );
@@ -299,7 +299,7 @@ void main() {
299
299
);
300
300
await expectLater (
301
301
state,
302
- emitsInOrder ([
302
+ emitsInOrder (< String > [
303
303
'State' ,
304
304
'State0' ,
305
305
'State01' ,
@@ -313,7 +313,8 @@ void main() {
313
313
sideEffects: [],
314
314
reducer: (state, action) => '$state +$action ' ,
315
315
);
316
- expect (stream, emitsInOrder ([emitsError (isException), emitsDone]));
316
+ expect (
317
+ stream, emitsInOrder (< dynamic > [emitsError (isException), emitsDone]));
317
318
});
318
319
319
320
test ('Pause and resume' , () {
@@ -411,7 +412,7 @@ void main() {
411
412
});
412
413
413
414
test ('Cancel subscription' , () async {
414
- final controller = StreamController (sync : true );
415
+ final controller = StreamController < int > (sync : true );
415
416
416
417
// ignore: unawaited_futures
417
418
controller.stream
@@ -427,7 +428,7 @@ void main() {
427
428
controller.add (1 );
428
429
controller.add (2 );
429
430
430
- await Future .delayed (const Duration (seconds: 1 ));
431
+ await Future < void > .delayed (const Duration (seconds: 1 ));
431
432
});
432
433
});
433
434
}
0 commit comments