emit method

void emit(
  1. String channel,
  2. Map<String, Object?> payload
)

Test helper: simulate an inbound payload on channel.

Implementation

void emit(String channel, Map<String, Object?> payload) {
  final c = _controllers.putIfAbsent(channel, StreamController<Map<String, Object?>>.broadcast);
  c.add(payload);
}