onReply method

void onReply(
  1. void callback()
)

Implementation

void onReply(void Function() callback) {
  if (!isActive) {
    throw MockIsNotActive(this);
  }

  _onReply ??= StreamController.broadcast();
  _onReply!.stream.listen((_) {
    callback();
  });
}