KeyStrokeHandler class

A class that manages buffering typing events and call onTypingStarted and onTypingStopped accordingly in a timed manner.

This class is used by Channel to manage typing events.

Constructors

KeyStrokeHandler({int startTypingEventTimeout = 1, int startTypingResendInterval = 3, required Future<void> onStartTyping([String? parentId]), required Future<void> onStopTyping([String? parentId])})
Creates a new instance of KeyStrokeHandler.

Properties

hashCode int
The hash code for this object.
no setterinherited
onStartTyping Future<void> Function([String? parentId])
Called when a typingStart event needs to be send.
final
onStopTyping Future<void> Function([String? parentId])
Called when a typingStop event needs to be send.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startTypingEventTimeout int
The number of seconds from the last onStartTyping callback until the onStopTyping callback is automatically invoked.
final
startTypingResendInterval int
The number of seconds after the last onStartTyping callback before the onStartTyping callback is automatically invoked again.
final

Methods

call([String? parentId]) Future<void>
Invokes the onStartTyping callback and schedules a timer to invoke the onStopTyping callback.
cancel() → void
Cancels the handler and stops the typing event.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited