setRetain method

void setRetain({
  1. bool? state,
})

Set the retain flag on the message

Implementation

void setRetain({bool? state}) {
  if ((state != null) && state) {
    header!.shouldBeRetained();
  }
}