TextMessage class
A text message (SMS).
Collected by TextMessageProbe for the CommunicationSamplingPackage.TEXT_MESSAGE measure, and listed in a TextMessageLog.
- Inheritance
-
- Object
- Serializable
- Data
- TextMessage
- Annotations
-
- @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
Constructors
- TextMessage({int? id, String? address, String? body, int? size, bool? read, DateTime? date, DateTime? dateSent, SmsType? type, SmsStatus? status})
-
TextMessage.fromJson(Map<
String, dynamic> json) -
factory
- TextMessage.fromSmsMessage(SmsMessage sms)
-
Creates a TextMessage from an
SmsMessagefrom the telephony plugin.factory
Properties
- $type ↔ String?
-
The type name written to
__typein JSON; set tojsonTypeon creation.getter/setter pairinherited - address ↔ String?
-
The address (phone number) of the other party of this message.
getter/setter pair
- body ↔ String?
-
The text body of this message.
getter/setter pair
- dataType → DataType
-
The type of this data as a
DataType.no setterinherited - date ↔ DateTime?
-
The date this message was created.
getter/setter pair
- dateSent ↔ DateTime?
-
The date this message was sent.
getter/setter pair
- fromJsonFunction → Function
-
The generated function that converts a JSON map to an object of this type.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ int?
-
The id of this message on the device.
getter/setter pair
- jsonType → String
-
The
__typeused for JSON serialization of this class.no setterinherited - read ↔ bool?
-
Whether the message has been read.
getter/setter pair
- recordId → String?
-
Stable identifier of the source record, if available; null by default.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size ↔ int?
-
The size in bytes of the body of the message.
getter/setter pair
- status ↔ SmsStatus?
-
The delivery status of the message.
getter/setter pair
- type ↔ SmsType?
-
The type of message, e.g. inbox or sent.
getter/setter pair
Methods
-
equivalentTo(
Data other) → bool -
Is this data equivalent to
other?inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns a JSON map of this object, including the
__typeproperty.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited