RxCommandSync<TParam, TResult> constructor

RxCommandSync<TParam, TResult>(
  1. Func1<TParam, TResult>? func,
  2. TResult funcNoParam()?,
  3. Stream<bool>? restriction,
  4. bool emitInitialCommandResult,
  5. bool emitLastResult,
  6. bool emitsLastValueToNewSubscriptions,
  7. TResult? initialLastResult,
  8. bool noReturnValue,
  9. String? debugName,
  10. bool noParamValue,
)

Implementation

factory RxCommandSync(
  Func1<TParam, TResult>? func,
  TResult Function()? funcNoParam,
  Stream<bool>? restriction,
  bool emitInitialCommandResult,
  bool emitLastResult,
  bool emitsLastValueToNewSubscriptions,
  TResult? initialLastResult,
  bool noReturnValue,
  String? debugName,
  bool noParamValue,
) {
  return RxCommandSync._(
    func,
    funcNoParam,
    emitsLastValueToNewSubscriptions || emitInitialCommandResult
        ? BehaviorSubject<TResult>()
        : PublishSubject<TResult>(),
    restriction,
    emitLastResult,
    emitsLastValueToNewSubscriptions || emitInitialCommandResult,
    emitInitialCommandResult,
    initialLastResult,
    noReturnValue,
    debugName,
    noParamValue,
  );
}