addBool method Null safety

MqttClientPayloadBuilder addBool(
  1. {required bool val}
)

Add a bool, true is 1, false is 0

Implementation

MqttClientPayloadBuilder addBool({required bool val}) {
  val ? addByte(1) : addByte(0);
  return this;
}