PayloadConverter<T> class Null safety

Interface that defines the methods and properties that must be provided by classes that interpret and convert inbound and outbound published message data.

Types that implement this interface should be aware that for the
purposes of converting data from published messages
(byte array to object model) that the MqttSubscriptionsManager
creates a single instance of the data converter and uses it for
all messages that are received.

The same is true for the publishing of data to a broker.
The PublishingManager will also cache instances of the converters
until the MqttClient is disposed.
This means, in both cases you can store state in the data
converters if you wish, and that state will persist between messages
received or published, but only a default empty constructor is




hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


convertFromBytes(Uint8Buffer messageData) → T
Converts received data from a raw byte array to an object graph.
convertToBytes(T data) Uint8Buffer
Converts sent data from an object graph to a byte array.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


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