MockCommand<TParam, TResult> constructor
MockCommand<TParam, TResult> ({})
Factory constructor that can take an optional observable to control if the command can be executet
Implementation
factory MockCommand({
Stream<bool>? restriction,
bool emitInitialCommandResult = false,
bool emitLastResult = false,
bool emitsLastValueToNewSubscriptions = false,
TResult? initialLastResult,
String? debugName,
}) {
return MockCommand._(
emitsLastValueToNewSubscriptions
? BehaviorSubject<TResult>()
: PublishSubject<TResult>(),
restriction,
emitLastResult,
false,
emitInitialCommandResult,
initialLastResult,
debugName);
}