1
1
import 'dart:async' ;
2
2
3
+ import 'package:meta/meta.dart' ;
3
4
import 'package:rxdart_ext/state_stream.dart' ;
4
5
5
6
import 'store.dart' ;
@@ -30,6 +31,7 @@ extension SelectorsExtension<Action, State> on RxReduxStore<Action, State> {
30
31
/// Observe a value of type [Result] exposed from a state stream, and listen only partially to changes.
31
32
///
32
33
/// The returned Stream is a single-subscription Stream.
34
+ @useResult
33
35
StateStream <Result > select <Result >(
34
36
Selector <State , Result > selector, {
35
37
Equals <Result >? equals,
@@ -39,6 +41,7 @@ extension SelectorsExtension<Action, State> on RxReduxStore<Action, State> {
39
41
/// Select two sub states and combine them by [projector] .
40
42
///
41
43
/// The returned Stream is a single-subscription Stream.
44
+ @useResult
42
45
StateStream <Result > select2 <SubState1 , SubState2 , Result >(
43
46
Selector <State , SubState1 > selector1,
44
47
Selector <State , SubState2 > selector2,
@@ -60,6 +63,7 @@ extension SelectorsExtension<Action, State> on RxReduxStore<Action, State> {
60
63
/// Select three sub states and combine them by [projector] .
61
64
///
62
65
/// The returned Stream is a single-subscription Stream.
66
+ @useResult
63
67
StateStream <Result > select3 <SubState1 , SubState2 , SubState3 , Result >(
64
68
Selector <State , SubState1 > selector1,
65
69
Selector <State , SubState2 > selector2,
@@ -87,6 +91,7 @@ extension SelectorsExtension<Action, State> on RxReduxStore<Action, State> {
87
91
/// Select four sub states and combine them by [projector] .
88
92
///
89
93
/// The returned Stream is a single-subscription Stream.
94
+ @useResult
90
95
StateStream <Result >
91
96
select4 <SubState1 , SubState2 , SubState3 , SubState4 , Result >(
92
97
Selector <State , SubState1 > selector1,
@@ -123,6 +128,7 @@ extension SelectorsExtension<Action, State> on RxReduxStore<Action, State> {
123
128
/// Select five sub states and combine them by [projector] .
124
129
///
125
130
/// The returned Stream is a single-subscription Stream.
131
+ @useResult
126
132
StateStream <Result >
127
133
select5 <SubState1 , SubState2 , SubState3 , SubState4 , SubState5 , Result >(
128
134
Selector <State , SubState1 > selector1,
@@ -173,6 +179,7 @@ extension SelectorsExtension<Action, State> on RxReduxStore<Action, State> {
173
179
/// Select five sub states and combine them by [projector] .
174
180
///
175
181
/// The returned Stream is a single-subscription Stream.
182
+ @useResult
176
183
StateStream <Result > select6< SubState1 , SubState2 , SubState3 , SubState4 ,
177
184
SubState5 , SubState6 , Result > (
178
185
Selector <State , SubState1 > selector1,
@@ -229,6 +236,7 @@ extension SelectorsExtension<Action, State> on RxReduxStore<Action, State> {
229
236
/// Select seven sub states and combine them by [projector] .
230
237
///
231
238
/// The returned Stream is a single-subscription Stream.
239
+ @useResult
232
240
StateStream <Result > select7< SubState1 , SubState2 , SubState3 , SubState4 ,
233
241
SubState5 , SubState6 , SubState7 , Result > (
234
242
Selector <State , SubState1 > selector1,
@@ -291,6 +299,7 @@ extension SelectorsExtension<Action, State> on RxReduxStore<Action, State> {
291
299
/// Select eight sub states and combine them by [projector] .
292
300
///
293
301
/// The returned Stream is a single-subscription Stream.
302
+ @useResult
294
303
StateStream <Result > select8< SubState1 , SubState2 , SubState3 , SubState4 ,
295
304
SubState5 , SubState6 , SubState7 , SubState8 , Result > (
296
305
Selector <State , SubState1 > selector1,
@@ -359,6 +368,7 @@ extension SelectorsExtension<Action, State> on RxReduxStore<Action, State> {
359
368
/// Select nine sub states and combine them by [projector] .
360
369
///
361
370
/// The returned Stream is a single-subscription Stream.
371
+ @useResult
362
372
StateStream <Result > select9< SubState1 , SubState2 , SubState3 , SubState4 ,
363
373
SubState5 , SubState6 , SubState7 , SubState8 , SubState9 , Result > (
364
374
Selector <State , SubState1 > selector1,
0 commit comments