on method Null safety

void on(
  1. String event,
  2. MessageSocket message
)

Implementation

void on(String event, MessageSocket message) {
  throw 'To use sockets you need dart:io or dart:html';
}