ClientAwarenessPlugin class
Client awareness plugin
This plugin is used to manage the awareness of the clients connected to the same document
- Implemented types
Constructors
-
ClientAwarenessPlugin.new({MessageCodec<
Message> ? codec, Map<String, dynamic> ? initialMetadata, Duration throttleDuration = const Duration(milliseconds: 50)}) - Constructor
Properties
- awareness → DocumentAwareness
-
The awareness state of the client
no setter
-
awarenessStream
→ Stream<
DocumentAwareness> -
Stream of awareness state changes
no setter
- client → CRDTSocketClient
-
The client instance.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
messageCodec
→ MessageCodec<
Message> -
The message codec for the plugin.
final
- myState → ClientAwareness?
-
The awareness state of the client
no setter
- name → String
-
The name of the plugin.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
Called when the plugin is disposed.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onConnected(
) → void - Called when the client is connected.
-
onDisconnected(
) → void - Called when the client is disconnected.
-
onMessage(
Message message) → void - Called when a message is received from the server.
-
requestState(
String documentId) → void - Request the state of the awareness from the server
-
toString(
) → String -
A string representation of this object.
inherited
-
updateLocalState(
Map< String, dynamic> metadata) → void - Update the local state of the awareness then send the update to the server
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited