onClose method Null safety

void onClose(
  1. CloseSocket fn
)

Implementation

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