internalProcessDetach method

void internalProcessDetach()

Implementation

void internalProcessDetach() {
  if (isAttached) {
    isAttached = false;
    if (!detachStreamController.isClosed) {
      detachStreamController.add(DetachEvent(device: this));
    }
    if (attachCompleter.isCompleted) {
      attachCompleter = Completer<void>();
    }
  }
}