Skip to content

TextMessage

A text message (SMS).

Collected by TextMessageProbe for the CommunicationSamplingPackage.TEXT_MESSAGE measure, and listed in a TextMessageLog.

Inheritance
Annotations

Constructors

TextMessage.fromJson

TextMessage.fromJson(
  1. Map<String, dynamic> json
)

TextMessage.fromSmsMessage

TextMessage.fromSmsMessage(
  1. SmsMessage sms
)

Creates a TextMessage from an SmsMessage from the telephony plugin.

TextMessage

TextMessage({
  1. int? id,
  2. String? address,
  3. String? body,
  4. int? size,
  5. bool? read,
  6. DateTime? date,
  7. DateTime? dateSent,
  8. SmsType? type,
  9. SmsStatus? status,
})

Properties

address

String? address
getter/setter pair

The address (phone number) of the other party of this message.

body

String? body
getter/setter pair

The text body of this message.

date

DateTime? date
getter/setter pair

The date this message was created.

dateSent

DateTime? dateSent
getter/setter pair

The date this message was sent.

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

id

int? id
getter/setter pair

The id of this message on the device.

read

bool? read
getter/setter pair

Whether the message has been read.

size

int? size
getter/setter pair

The size in bytes of the body of the message.

status

SmsStatus? status
getter/setter pair

The delivery status of the message.

type

SmsType? type
getter/setter pair

The type of message, e.g. inbox or sent.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.