HMSMessage class

100ms HMSMessage

To use, import package:hmssdk_flutter/model/hms_message.dart.

HMSMessage contains the message and related properties.

What's a video call without being able to send messages to each other too? 100ms supports chat for every video/audio room you create. You can see an example of every type of message (of the types below) being sent and displayed in the advanced sample app.

You can use chat feature using this HMSMessage object it will contains each message with other relevant information.

Refer chat guide here

Constructors

HMSMessage({required String messageId, required HMSPeer? sender, required String message, required String type, required DateTime time, HMSMessageRecipient? hmsMessageRecipient})
HMSMessage.fromMap(Map map)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
hmsMessageRecipient HMSMessageRecipient?
getter/setter pair
message String
message which you want to send.
final
messageId String
messageId id to uniquely identify the message
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sender HMSPeer?
sender id basically it is the peerId who is sending message.
final
time DateTime
time at which sender sent the message
final
type String
type of the message
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap(Map<String, dynamic> map) Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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