onOpen method Null safety

void onOpen(
  1. OpenSocket fn
)

Implementation

void onOpen(OpenSocket fn) {
  throw 'To use sockets you need dart:io or dart:html';
}