addOption method

void addOption(
  1. Option<Object?> option
)
inherited

Adds an option to the list of options of this CoapMessage.

Implementation

void addOption(final Option<Object?> option) {
  if (!option.repeatable) {
    _options.removeWhere((final element) => element.type == option.type);
  }
  _options.add(option);
}