MqttPublishMessage class Null safety

Implementation of an MQTT Publish Message, used for publishing telemetry data along a live MQTT stream.



Initializes a new instance of the MqttPublishMessage class.
MqttPublishMessage.fromByteBuffer(MqttHeader header, MqttByteBuffer messageStream)
Initializes a new instance of the MqttPublishMessage class.


hashCode int
The hash code for this object. [...]
read-only, inherited
The header of the MQTT Message. Contains metadata about the message
read / write, inherited
payload MqttPublishPayload
Gets or sets the payload of the Mqtt Message.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
variableHeader MqttPublishVariableHeader?
The variable header contents. Contains extended metadata about the message
read / write


clearPublishData() MqttPublishMessage
Removes the current published data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
publishData(Uint8Buffer data) MqttPublishMessage
Appends data to publish to the end of the current message payload.
readFrom(MqttByteBuffer messageStream) → void
Reads a message from the supplied stream.
setRetain({bool? state}) → void
Set the retain flag on the message
toString() String
A string representation of this object. [...]
toTopic(String topicName) MqttPublishMessage
Sets the topic to publish data to.
withMessageIdentifier(int messageIdentifier) MqttPublishMessage
Sets the message identifier of the message.
withQos(MqttQos qos) MqttPublishMessage
Sets the Qos of the published message.
writeTo(MqttByteBuffer messageStream) → void
Writes the message to the supplied stream.


operator ==(Object other) bool
The equality operator. [...]