replyFor method

void replyFor({
  1. required String topic,
  2. required String event,
  3. required PushResult result,
})

Registers a canned result to return from the next matching FakeChatTransport.push call with the given topic and event.

Implementation

void replyFor({
  required String topic,
  required String event,
  required PushResult result,
}) {
  _transport._replyQueue
      .putIfAbsent('$topic::$event', () => <PushResult>[])
      .add(result);
}