combine<R, B> method
SReadOnlyState<R>
combine<R, B>(
- SBaseState<
B> other, - SCombinerSingleFunction<
R, T, B> transformer
inherited
Implementation
@override
SReadOnlyState<R> combine<R,B>(SBaseState<B> other, SCombinerSingleFunction<R, T,B> transformer) {
var t = _CombinerStream.combineTwo(this, other, (current, other) {
return transformer(current, other);
});
var initial =
(valueOrNull != null && other.valueOrNull != null) ? transformer(valueOrNull as T, other.valueOrNull as B) : null;
return SReadOnlyState._fromStream(t.stream, initial);
}