operationCalls method
Returns native callbacks named method, plus untargeted error callbacks while this is the newest operation.
Calling this makes the new stream the recipient of error callbacks, taking that role from any earlier stream.
Callbacks named method keep reaching every earlier stream regardless. Consumers distinguish the two by checking
whether MethodCall.method equals errorMethod. The returned stream is a broadcast stream.
Implementation
Stream<MethodCall> operationCalls(String method) {
final Object owner = Object();
_errorOwner = owner;
return _calls.stream.where(
(MethodCall call) =>
call.method == method ||
(call.method == errorMethod && identical(_errorOwner, owner)),
);
}