Message class
Constructors
-
Message({required String message, required DateTime createdAt, required String sentBy, String id = '', ReplyMessage replyMessage = const ReplyMessage(), MessageType messageType = MessageType.text, Duration? voiceMessageDuration, DateTime? updateAt, Map<
String, dynamic> ? update, MessageStatus status = MessageStatus.pending, Reaction? reaction}) -
Message.fromJson(Map<
String, dynamic> json) -
factory
Properties
- createdAt → DateTime
-
The date and time when the message was created.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for the message.
final
-
key
→ GlobalKey<
State< StatefulWidget> > -
Key for accessing the widget's render box.
final
- message → String
-
The message content, which can be text, an image path,
or an audio file path.
final
- messageType → MessageType
-
Represents the type of message.
final
- reaction → Reaction
-
Represents reaction on message.
final
- replyMessage → ReplyMessage
-
The replied message, if the user has replied to any message.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sentBy → String
-
The sender's unique identifier (ID).
final
- setStatus ← MessageStatus
-
Updates the message status and triggers UI rebuilds
for configured listeners.
no getter
- status → MessageStatus
-
Provides message's current status.
no setter
-
statusNotifier
→ ValueListenable<
MessageStatus> -
A ValueListenable for MessageStatus that notifies listeners
when the message state changes.
no setter
-
update
→ Map<
String, dynamic> ? -
final
- updateAt → DateTime?
-
final
- voiceMessageDuration ↔ Duration?
-
Provides max duration for recorded voice message.
getter/setter pair
Methods
-
copyWith(
{String? id, GlobalKey< State< ? key, String? message, DateTime? createdAt, String? sentBy, ReplyMessage? replyMessage, Reaction? reaction, MessageType? messageType, Duration? voiceMessageDuration, MessageStatus? status, DateTime? updateAt, Map<StatefulWidget> >String, String> ? update, bool forceNullValue = false}) → Message -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
{bool includeNullValues = true}) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited