SmsConversationMessage class

SMS Conversation Message model representing a message within a conversation

This model extends SmsMessage to include conversation-specific information such as thread ID and additional context.

Example usage:

final conversationMessage = SmsConversationMessage(
  id: '123',
  threadId: '456',
  address: '+1234567890',
  body: 'Hello world!',
  date: DateTime.now(),
  dateSent: DateTime.now(),
  type: SmsType.inbox,
  read: false,
);

Constructors

SmsConversationMessage({required String id, required String threadId, required String address, required String body, required DateTime date, required DateTime dateSent, required SmsType type, required bool read})
const
SmsConversationMessage.fromMap(Map<String, dynamic> map)
Creates an SmsConversationMessage from a Map (typically from platform channel) This method safely converts the map data to proper types
factory

Properties

address String
Phone number or address that sent/received the message
final
body String
Content/body of the message
final
date DateTime
Date when the message was received
final
dateSent DateTime
Date when the message was sent (may be different from date)
final
hashCode int
The hash code for this object.
no setteroverride
id String
Unique identifier for the message
final
read bool
Whether the message has been read
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
threadId String
Thread ID of the conversation this message belongs to
final
type SmsType
Type of message (inbox, sent, draft, etc.)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Converts the SmsConversationMessage to a Map for serialization
toSmsMessage() SmsMessage
Converts this conversation message to a regular SmsMessage Useful when you need to treat it as a standard SMS message
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override