closeConnectionIfNeeded method
void
closeConnectionIfNeeded()
Closes input connection if it's currently open. Otherwise does nothing.
Implementation
void closeConnectionIfNeeded() {
if (!hasConnection) {
return;
}
_textInputConnection!.close();
_textInputConnection = null;
_lastKnownRemoteTextEditingValue = null;
}