onReply method

void onReply(
  1. String status,
  2. ReceiverCallback callback
)

Associate a callback to be called if and when a reply with the given status is received.

Implementation

void onReply(String status, ReceiverCallback callback) {
  (_receivers[status] ??= []).add(callback);
}