RxCommandStream<TParam, TResult> constructor

RxCommandStream<TParam, TResult>(
  1. StreamProvider<TParam, TResult> provider,
  2. Stream<bool> canExecute,
  3. bool emitInitialCommandResult,
  4. bool emitLastResult,
  5. bool emitsLastValueToNewSubscriptions,
  6. TResult initialLastResult
)

Implementation

factory RxCommandStream(
    StreamProvider<TParam, TResult> provider,
    Stream<bool> canExecute,
    bool emitInitialCommandResult,
    bool emitLastResult,
    bool emitsLastValueToNewSubscriptions,
    TResult initialLastResult) {
  return RxCommandStream._(
      provider,
      emitsLastValueToNewSubscriptions || emitInitialCommandResult
          ? BehaviorSubject<TResult>()
          : PublishSubject<TResult>(),
      canExecute,
      emitLastResult,
      emitsLastValueToNewSubscriptions || emitInitialCommandResult,
      emitInitialCommandResult,
      initialLastResult);
}