Message class
Constructors
- Message({String id = '', required String message, required DateTime createdAt, required String sendBy, ReplyMessage replyMessage = const ReplyMessage(), Reaction? reaction, MessageType messageType = MessageType.text, Duration? voiceMessageDuration, MessageStatus status = MessageStatus.pending})
-
Message.fromJson(Map<
String, dynamic> json) -
factory
Properties
- createdAt → DateTime
-
Provides message created date time.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Provides id
final
-
key
→ GlobalKey<
State< StatefulWidget> > -
Used for accessing widget's render box.
final
- message → String
-
Provides actual message it will be text or image/audio file path.
final
- messageType → MessageType
-
Provides message type.
final
- reaction → Reaction
-
Represents reaction on message.
final
- replyMessage → ReplyMessage
-
Provides reply message if user triggers any reply on any message.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendBy → String
-
Provides id of sender of message.
final
- setStatus ← MessageStatus
-
This setter can be used to update message receipts, after which the configured
builders will be updated.
no getter
- status → MessageStatus
-
curret messageStatus
no setter
-
statusNotifier
→ ValueNotifier<
MessageStatus> -
For MessageStatus ValueNotfier which is used to for rebuilds
when state changes.
Using ValueNotfier to avoid usage of setState((){}) in order
rerender messages with new receipts.
no setter
- voiceMessageDuration ↔ Duration?
-
Provides max duration for recorded voice message.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited