disconnectMessage property
The disconnection message to use to override the default. The default disconnection reason is normal disconnection, this allows setting of your own reason code and any other properties.
Implementation
MqttDisconnectMessage disconnectMessage = MqttDisconnectMessage()
.withReasonCode(MqttDisconnectReasonCode.normalDisconnection);