getFirstOption method
Returns the first option of the specified type, or null
Implementation
CoapOption? getFirstOption(final OptionType optionType) =>
getOptions(optionType)
?.firstWhereOrNull((final element) => element.type == optionType);