onError method Null safety

void onError(
  1. CloseSocket fn
)

Implementation

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