getFirstOption method

CoapOption? getFirstOption(
  1. OptionType optionType
)
inherited

Returns the first option of the specified type, or null

Implementation

CoapOption? getFirstOption(final OptionType optionType) =>
    getOptions(optionType)
        ?.firstWhereOrNull((final element) => element.type == optionType);