CrispMessage class Events

A chat message delivered alongside CrispEventType.messageSent or CrispEventType.messageReceived events.

This is a minimal summary, not a full mapping of every native content type (carousel targets, picker choices, file/audio metadata are not included). text is only populated when contentType is CrispMessageContentType.text.

@param origin Raw origin string reported by the native SDK (e.g. "chat", "local", "network", "update"). Android reports up to 8 distinct values; iOS reports only 3 — kept as a raw string rather than a strict enum to avoid lossy mapping between platforms.

Constructors

CrispMessage({required bool isMe, required CrispMessageSender from, required String? origin, required DateTime timestamp, required int fingerprint, required CrispMessageContentType contentType, required String? text})
CrispMessage.fromMap(Map map)
Parses a CrispMessage from the raw map sent over the method channel.
factory

Properties

contentType → CrispMessageContentType
The kind of content carried by this message.
final
fingerprint → int
A unique identifier for this message within the session.
final
from → CrispMessageSender
Who sent the message.
final
hashCode → int
The hash code for this object.
no setterinherited
isMe → bool
Whether this message was sent by this device's visitor.
final
origin → String?
Raw origin string reported by the native SDK. See class docs.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String?
The message text, only populated when contentType is CrispMessageContentType.text.
final
timestamp → DateTime
When the message was sent.
final

Methods

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