emit method Null safety

void emit(
  1. String event,
  2. dynamic data
)

Implementation

void emit(String event, dynamic data) {
  send(jsonEncode({'type': event, 'data': data}));
}