ChannelEvent class
Event received from a channel.
Constructors
-
ChannelEvent({required String id, required ConversationKey conversation, required String type, String? text, String? userId, String? userName, required DateTime timestamp, List<
ChannelAttachment> ? attachments, Map<String, dynamic> ? metadata}) -
const
-
ChannelEvent.fromJson(Map<
String, dynamic> json) -
Create from JSON.
factory
-
ChannelEvent.message({required String id, required ConversationKey conversation, required String text, String? userId, String? userName, DateTime? timestamp, List<
ChannelAttachment> ? attachments, Map<String, dynamic> ? metadata}) -
Create a message event.
factory
Properties
-
attachments
→ List<
ChannelAttachment> ? -
Attached files or media.
final
- conversation → ConversationKey
-
Conversation this event belongs to.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique event ID (for idempotency).
final
-
metadata
→ Map<
String, dynamic> ? -
Platform-specific metadata.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String?
-
Text content (if applicable).
final
- timestamp → DateTime
-
Event timestamp.
final
- type → String
-
Event type (message, reaction, file, etc.).
final
- userId → String?
-
User who triggered the event.
final
- userName → String?
-
User display name.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited