detach method

void detach({
  1. bool notify = true,
})

Close the session and clear any visible preedit. Safe to call when not attached. notify — when false, skip onPreeditChanged (e.g. widget dispose).

Implementation

void detach({bool notify = true}) {
  _composing = false;
  if (notify) onPreeditChanged(null);
  _conn?.close();
  _conn = null;
}