Creates a new StreamMatcher described by
description that matches
matchQueue callback is used to implement StreamMatcher.matchQueue,
and should follow all the guarantees of that method. In particular:
- If it matches successfully, it should return
nulland possibly consume events.
- If it fails to match, consume no events and return a description of the failure.
- The description should be in past tense.
- The description should be gramatically valid when used after "the stream"—"emitted the wrong events", for example.
matchQueue callback may return the empty string to indicate a
failure if it has no information to add beyond the description of the
failure and the events actually emitted by the stream.
description should be in the subjunctive mood. This means that it
should be grammatically valid when used after the word "should". For
example, it might be "emit the right events".
factory StreamMatcher( Future<String> Function(StreamQueue) matchQueue, String description) = _StreamMatcher;