ReplaySubject<T> class
A Subject that replays all its previous values to new subscribers.
- Inheritance
- Available extensions
- AuditOperator
- BufferOperator
- CastOperator
- CatchErrorOperator
- CombineLatestOperator
- ComposeOperator
- ConcatOperator
- CountOperator
- DebounceOperator
- DefaultIfEmptyOperator
- DelayOperator
- DematerializeOperator
- DistinctOperator
- DistinctUntilChangedOperator
- ExhaustAllOperator
- ExhaustMapOperator
- FinalizeOperator
- FirstOperator
- FlatMapOperator
- FlattenObservable
- FoldOperator
- IgnoreElementsOperator
- IsEmptyOperator
- LastOperator
- MapOperator
- MaterializeOperator
- MergeAllOperator
- MergeMapOperator
- MulticastOperator
- ObservableToFuture
- ObservableToStream
- ObserveOnOperator
- PairwiseOperator
- PublishOperator
- ReduceOperator
- RepeatOperator
- SampleOperator
- SingleOperator
- SkipOperator
- SkipUntilOperator
- SkipWhileOperator
- SwitchAllOperator
- SwitchMapOperator
- TakeLastOperator
- TakeOperator
- TakeUntilOperator
- TakeWhileOperator
- TapOperator
- ThrottleOperator
- TimeoutOperator
- ToListOperator
- ToMapOperator
- ToSetOperator
- WhereOperator
- WhereTypeOperator
Constructors
- ReplaySubject({int? bufferSize})
Properties
- bufferSize → int?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Returns true, if this resource has been disposed.
no setterinherited
- isObserved → bool
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
audit<
R> (DurationSelector< T, R> durationSelector) → Observable<T> -
Available on Observable<
Ignores values from this Observable for a duration determined by the Observable returned fromT> , provided by the AuditOperator extensiondurationSelector
, then emits the most recent source value, then repeats the process. -
auditTime(
Duration duration, {Scheduler? scheduler}) → Observable< T> -
Available on Observable<
Ignores values from this Observable for the givenT> , provided by the AuditOperator extensionduration
, then emits the most recent source value, then repeats the process. -
beginWith(
Observable< T> observable) → Observable<T> -
Available on Observable<
Prepends the emission of items with an Observable.T> , provided by the ConcatOperator extension -
buffer<
R> ({Scheduler? scheduler, Observable< R> ? trigger, int? maxLength, Duration? maxAge}) → Observable<List< T> > -
Available on Observable<
Gathers the items emitted by this Observable and bundles these items into a list until eitherT> , provided by the BufferOperator extension -
cast<
R> () → Observable< R> -
Available on Observable<
Casts the values from this Observable toT> , provided by the CastOperator extensionR
. -
catchError<
E> (ErrorHandler< T, E> handler) → Observable<T> -
Available on Observable<
Catches errors of typeT> , provided by the CatchErrorOperator extensionE
thrown by this Observable and handles them by either returning a new Observable of typeT
, throwing the same or a different error, or returningnull
to complete the Observable. -
combineLatest(
) → Observable< List< T> > -
Available on Observable<
Combines multiple source to create an Observable whose values are calculated from the latest values of each of its inputs.Observable< , provided by the CombineLatestOperator extensionT> > -
complete(
) → void -
Pass completion to the observer.
inherited
-
compose<
R> (Transformer< T, R> transformation) → Observable<R> -
Available on Observable<
Prepends the emission of items withT> , provided by the ComposeOperator extensiontransformation
. -
count(
) → Observable< int> -
Available on Observable<
Counts the number of emissions of this Observable and emits that number on completion.T> , provided by the CountOperator extension -
debounce<
R> (DurationSelector< T, R> durationSelector) → Observable<T> -
Available on Observable<
Emits a value from this Observable only after a particular time span determined by another Observable has passed without another emission.T> , provided by the DebounceOperator extension -
debounceTime(
Duration duration, {Scheduler? scheduler}) → Observable< T> -
Available on Observable<
Emits a value from this Observable only after a particular time span has passed without another emission.T> , provided by the DebounceOperator extension -
defaultIfEmpty(
T value) → Observable< T> -
Available on Observable<
Emits a given value if this Observable completes without emitting any value, otherwise mirrors the source.T> , provided by the DefaultIfEmptyOperator extension -
delay<
R> (DurationSelector< T, R> durationSelector) → Observable<T> -
Available on Observable<
Delays the emission of items from this Observable until the Observable returned fromT> , provided by the DelayOperator extensiondurationSelector
triggers. -
delayTime(
Duration duration, {Scheduler? scheduler}) → Observable< T> -
Available on Observable<
Delays the emission of items from this Observable by a given timeout.T> , provided by the DelayOperator extension -
dematerialize(
) → Observable< T> -
Available on Observable<
Dematerialize events of this Observable into from a sequence of Event objects.Event< , provided by the DematerializeOperator extensionT> > -
dispose(
) → void -
Disposes the resource.
inherited
-
distinct(
{Predicate2< T, T> ? equals, Map1<T, int> ? hashCode}) → Observable<T> -
Available on Observable<
Emits all items emitted by this Observable that are distinct from the previous ones.T> , provided by the DistinctOperator extension -
distinctUntilChanged<
K> ({Map1< T, K> ? key, Predicate2<K, K> ? compare}) → Observable<T> -
Available on Observable<
Emits all items emitted by this Observable that are different from the previous one.T> , provided by the DistinctUntilChangedOperator extension -
endWith(
Observable< T> observable) → Observable<T> -
Available on Observable<
Appends the emission of items with an Observable.T> , provided by the ConcatOperator extension -
error(
Object error, StackTrace stackTrace) → void -
Pass an error to the observer.
inherited
-
exhaustAll(
{int concurrent = 1}) → Observable< T> -
Available on Observable<
Emits and completes higher-order Observable. Subscribes to at mostObservable< , provided by the ExhaustAllOperator extensionT> >concurrent
sources, and drops observables exceeding this threshold. -
exhaustMap<
R> (Map1< T, Observable< project, {int concurrent = 1}) → Observable<R> >R> -
Available on Observable<
Emits and completes values from a higher-order Observable retrieved by projecting the values of the source to higher-order Observables. Subscribes to at mostT> , provided by the ExhaustMapOperator extensionconcurrent
sources, drops observables exceeding this threshold. -
exhaustMapTo<
R> (Observable< R> observable, {int concurrent = 1}) → Observable<R> -
Available on Observable<
Emits and completes values from single higher-order Observable. Subscribes to at mostT> , provided by the ExhaustMapOperator extensionconcurrent
sources, drops observables exceeding this threshold. -
finalize(
CompleteCallback finalize) → Observable< T> -
Available on Observable<
Return an Observable that mirrors this Observable, but will call a specified function when the source terminates on completion or error.T> , provided by the FinalizeOperator extension -
findFirst(
Predicate1< T> predicate) → Observable<T> -
Available on Observable<
Emits the first item of this Observable sequence matching theT> , provided by the FirstOperator extensionpredicate
, or emits an TooFewError otherwise. -
findFirstOrDefault(
Predicate1< T> predicate, T value) → Observable<T> -
Available on Observable<
Emits the first item of this Observable sequence matching theT> , provided by the FirstOperator extensionpredicate
, or the provided defaultvalue
otherwise. -
findFirstOrElse(
Predicate1< T> predicate, Map0<T> callback) → Observable<T> -
Available on Observable<
Emits the first item of this Observable sequence matching theT> , provided by the FirstOperator extensionpredicate
, or evaluate the providedcallback
otherwise. -
findLast(
Predicate1< T> predicate) → Observable<T> -
Available on Observable<
Emits the last item of this Observable matching theT> , provided by the LastOperator extensionpredicate
, or emits an TooFewError otherwise. -
findLastOrDefault(
Predicate1< T> predicate, T value) → Observable<T> -
Available on Observable<
Emits the last item of this Observable matching theT> , provided by the LastOperator extensionpredicate
, or the provided defaultvalue
otherwise. -
findLastOrElse(
Predicate1< T> predicate, Map0<T> callback) → Observable<T> -
Available on Observable<
Emits the last item of this Observable matching theT> , provided by the LastOperator extensionpredicate
, or evaluate the providedcallback
otherwise. -
first(
) → Observable< T> -
Available on Observable<
Emits the first item of this Observable, or emits an TooFewError otherwise.T> , provided by the FirstOperator extension -
firstOrDefault(
T value) → Observable< T> -
Available on Observable<
Emits the first item of this Observable, or the provided defaultT> , provided by the FirstOperator extensionvalue
otherwise. -
firstOrElse(
Map0< T> callback) → Observable<T> -
Available on Observable<
Emits the first item of this Observable, or evaluate the providedT> , provided by the FirstOperator extensioncallback
otherwise. -
flatMap<
R> (Map1< T, Observable< project, {int concurrent = maxInteger}) → Observable<R> >R> -
Available on Observable<
For each value of this Observable, transform that value to a higher-order observable with the providedT> , provided by the FlatMapOperator extensionproject
function and merge its emitted values. Subscribe to at mostconcurrent
sources. -
flatMapTo<
R> (Observable< R> observable, {int concurrent = maxInteger}) → Observable<R> -
Available on Observable<
For each value of this Observable, merge all values from the single higher-orderT> , provided by the FlatMapOperator extensionobservable
. Subscribe to at mostconcurrent
sources. -
flatten(
{int concurrent = maxInteger}) → Observable< T> -
Available on Observable<
For each observable of this Observable, subscribe to at mostObservable< , provided by the FlattenObservable extensionT> >concurrent
observables and emit all values. -
fold<
R> (R initialValue, Map2< R, T, R> transform) → Observable<R> -
Available on Observable<
Combines a sequence of values by repeatedly applyingT> , provided by the FoldOperator extensiontransform
, starting with the providedinitialValue
. -
ignoreElements(
) → Observable< T> -
Available on Observable<
Ignores all items emitted by this Observable and only passes errors and completion events.T> , provided by the IgnoreElementsOperator extension -
isEmpty(
) → Observable< bool> -
Available on Observable<
EmitsT> , provided by the IsEmptyOperator extensiontrue
if this Observable completes without emitting any values, otherwise emitsfalse
. -
last(
) → Observable< T> -
Available on Observable<
Emits the last item of this Observable, or emits an TooFewError otherwise.T> , provided by the LastOperator extension -
lastOrDefault(
T value) → Observable< T> -
Available on Observable<
Emits the last item of this Observable, or the provided defaultT> , provided by the LastOperator extensionvalue
otherwise. -
lastOrElse(
Map0< T> callback) → Observable<T> -
Available on Observable<
Emits the last item of this Observable, or evaluate the providedT> , provided by the LastOperator extensioncallback
otherwise. -
map<
R> (Map1< T, R> transform) → Observable<R> -
Available on Observable<
Applies the given projection functionT> , provided by the MapOperator extensiontransform
to each value emitted by this Observable, and emits the resulting value. -
mapTo<
R> (R value) → Observable< R> -
Available on Observable<
Emits a constantT> , provided by the MapOperator extensionvalue
for each value emitted by this Observable. -
materialize(
) → Observable< Event< T> > -
Available on Observable<
Materializes the events of this Observable as Event objects.T> , provided by the MaterializeOperator extension -
mergeAll(
{int concurrent = maxInteger}) → Observable< T> -
Available on Observable<
For each observable of this Observable, subscribe to at mostObservable< , provided by the MergeAllOperator extensionT> >concurrent
observables and emit all values. -
mergeMap<
R> (Map1< T, Observable< project, {int concurrent = maxInteger}) → Observable<R> >R> -
Available on Observable<
For each value of this Observable, transform that value to a higher-order observable with the providedT> , provided by the MergeMapOperator extensionproject
function and merge its emitted values. Subscribe to at mostconcurrent
sources. -
mergeMapTo<
R> (Observable< R> observable, {int concurrent = maxInteger}) → Observable<R> -
Available on Observable<
For each value of this Observable, merge all values from the single higher-orderT> , provided by the MergeMapOperator extensionobservable
. Subscribe to at mostconcurrent
sources. -
multicast(
{Subject< T> ? subject, Map0<Subject< ? factory}) → ConnectableObservable<T> >T> -
Available on Observable<
Returns an multicast observable that shares the underlying stream.T> , provided by the MulticastOperator extension -
next(
T value) → void -
Pass a value to the observer.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
observeOn(
Scheduler scheduler, {Duration? delay}) → Observable< T> -
Available on Observable<
Re-emits all notifications from this Observable with a custom scheduler.T> , provided by the ObserveOnOperator extension -
pairwise(
) → Observable< (T, T)> -
Available on Observable<
Groups the items emitted by an Observable into a record type that represent the latest pair of items emitted by the source Observable.T> , provided by the PairwiseOperator extension -
publishBehavior(
T value) → ConnectableObservable< T> -
Available on Observable<
Creates a ConnectableObservable that emits its initial or last seen value to its subscribers.T> , provided by the PublishOperator extension -
publishLast(
) → ConnectableObservable< T> -
Available on Observable<
Creates a ConnectableObservable that emits its last value to all its subscribers on completion.T> , provided by the PublishOperator extension -
publishReplay(
{int? bufferSize}) → ConnectableObservable< T> -
Available on Observable<
Creates a ConnectableObservable that replays all its previous values to new subscribers.T> , provided by the PublishOperator extension -
reduce(
Map2< T, T, T> transform) → Observable<T> -
Available on Observable<
Combines a sequence of values by repeatedly applyingT> , provided by the ReduceOperator extensiontransform
. -
repeat(
[int count = maxInteger]) → Observable< T> -
Available on Observable<
Resubscribes on this observableT> , provided by the RepeatOperator extensioncount
times. -
sample<
R> (Observable< R> trigger) → Observable<T> -
Available on Observable<
Emits the most recently emitted value from this Observable whenever theT> , provided by the SampleOperator extensiontrigger
emits. -
sampleTime(
Duration duration, {Scheduler? scheduler}) → Observable< T> -
Available on Observable<
Emits the most recently emitted value from this Observable within periodic time intervals.T> , provided by the SampleOperator extension -
single(
) → Observable< T> -
Available on Observable<
Emits the single element of this Observable, or emits TooFewError if there was no element, or emits TooManyError if there was more than 1 element.T> , provided by the SingleOperator extension -
singleOrDefault(
{required T tooFew, required T tooMany}) → Observable< T> -
Available on Observable<
Emits the single element of this Observable, or emitsT> , provided by the SingleOperator extensiontooFew
if there was no element, or emitstooMany
if there was more than 1 element. -
singleOrElse(
{required Map0< T> tooFew, required Map0<T> tooMany}) → Observable<T> -
Available on Observable<
Emits the single element of this Observable, or evaluates theT> , provided by the SingleOperator extensiontooFew
callback if there was no element, or evaluates thetooMany
callback if there was more than 1 element. -
skip(
[int count = 1]) → Observable< T> -
Available on Observable<
Skips over the firstT> , provided by the SkipOperator extensioncount
values before starting to emit. -
skipUntil<
R> (Observable< R> trigger) → Observable<T> -
Available on Observable<
Skips over all values until an Observable emits a first value.T> , provided by the SkipUntilOperator extension -
skipWhile(
Predicate1< T> predicate) → Observable<T> -
Available on Observable<
Skips over the values while theT> , provided by the SkipWhileOperator extensionpredicate
istrue
. -
subscribe(
Observer< T> observer) → Disposable -
Subscribes with the provided
observer
.inherited -
subscribeToActive(
Observer< T> observer) → Disposable -
override
-
subscribeToComplete(
Observer< T> observer) → Disposable -
override
-
subscribeToError(
Observer< T> observer, Object error, StackTrace stackTrace) → Disposable -
inherited
-
switchAll(
) → Observable< T> -
Available on Observable<
Emits values only from the most recently received higher-order Observable.Observable< , provided by the SwitchAllOperator extensionT> > -
switchMap<
R> (Map1< T, Observable< project) → Observable<R> >R> -
Available on Observable<
Emits values from the most recent higher-order Observable retrieved by projecting the values of the source to higher-order Observables.T> , provided by the SwitchMapOperator extension -
switchMapTo<
R> (Observable< R> observable) → Observable<R> -
Available on Observable<
Emits all values from the most recent higher-orderT> , provided by the SwitchMapOperator extensionobservable
. -
take(
[int count = 1]) → Observable< T> -
Available on Observable<
Emits the firstT> , provided by the TakeOperator extensioncount
values before completing. -
takeLast(
[int count = 1]) → Observable< T> -
Available on Observable<
Emits the lastT> , provided by the TakeLastOperator extensioncount
values emitted by the source. -
takeUntil<
R> (Observable< R> trigger) → Observable<T> -
Available on Observable<
Emits values until an Observable emits a first value.T> , provided by the TakeUntilOperator extension -
takeWhile(
Predicate1< T> predicate, {bool inclusive = false}) → Observable<T> -
Available on Observable<
Emits values while theT> , provided by the TakeWhileOperator extensionpredicate
returnstrue
. -
tap(
Observer< T> handler) → Observable<T> -
Available on Observable<
Perform a side effect for every emission on the source.T> , provided by the TapOperator extension -
throttle<
R> (DurationSelector< T, R> durationSelector, {bool leading = true, bool trailing = true}) → Observable<T> -
Available on Observable<
Emits a value from this Observable, then ignores values for the duration until the Observable returned byT> , provided by the ThrottleOperator extensiondurationSelector
triggers a value or completes. -
throttleTime(
Duration duration, {bool leading = true, bool trailing = true, Scheduler? scheduler}) → Observable< T> -
Available on Observable<
Emits a value from this Observable, then ignores values forT> , provided by the ThrottleOperator extensionduration
. -
timeout(
{Duration? first, Duration? between, Duration? total, Scheduler? scheduler}) → Observable< T> -
Available on Observable<
totals with a TimeoutError, if the observable fails to emit a value in the given time span.T> , provided by the TimeoutOperator extension -
toFuture(
) → Future< T> -
Available on Observable<
Returns a Future that completes with the first value of this Observable.T> , provided by the ObservableToFuture extension -
toList(
[Map0< List< ? constructor]) → Observable<T> >List< T> > -
Available on Observable<
Returns a List from an observable sequence.T> , provided by the ToListOperator extension -
toListMultimap<
K, V> ({Map0< ListMultimap< ? constructor, Map1<K, V> >T, K> ? keySelector, Map1<T, V> ? valueSelector}) → Observable<ListMultimap< K, V> > -
Available on Observable<
Returns aT> , provided by the ToMapOperator extensionListMultimap
from an observable sequence. -
toMap<
K, V> ({Map0< Map< ? constructor, Map1<K, V> >T, K> ? keySelector, Map1<T, V> ? valueSelector}) → Observable<Map< K, V> > -
Available on Observable<
Returns a Map from an observable sequence.T> , provided by the ToMapOperator extension -
toSet(
[Map0< Set< ? constructor]) → Observable<T> >Set< T> > -
Available on Observable<
Returns a Set from an observable sequence.T> , provided by the ToSetOperator extension -
toSetMultimap<
K, V> ({Map0< SetMultimap< ? constructor, Map1<K, V> >T, K> ? keySelector, Map1<T, V> ? valueSelector}) → Observable<SetMultimap< K, V> > -
Available on Observable<
Returns aT> , provided by the ToMapOperator extensionSetMultimap
from an observable sequence. -
toStream(
) → Stream< T> -
Available on Observable<
Returns a Stream that subscribes to and emits the values of this Observable.T> , provided by the ObservableToStream extension -
toString(
) → String -
A string representation of this object.
inherited
-
where(
Predicate1< T> predicate) → Observable<T> -
Available on Observable<
Filter items emitted by the source Observable by only emitting those that satisfy a specified predicate.T> , provided by the WhereOperator extension -
whereType<
R> () → Observable< R> -
Available on Observable<
Filter items emitted by the source Observable by only emitting those that are of the specified type.T> , provided by the WhereTypeOperator extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited