onClosed method

void onClosed(
  1. Service service
)

Implementation

void onClosed(Service service) {
  service.connected = false;
  onclose?.call(service, null);
}