onTextChanged method
- String text
The composer text changed: sends one typing on, then off after
typingIdle without keystrokes.
Implementation
void onTextChanged(String text) {
final conv = _state.conversation;
if (conv == null) return;
if (text.trim().isEmpty) {
_stopTyping();
return;
}
if (!_typingOn) {
_typingOn = true;
_send(ClientFrame.typing(conversationId: conv.id, on: true));
}
_typingTimer?.cancel();
_typingTimer = Timer(typingIdle, _stopTyping);
}