inputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSetNullableFromJson function

InputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSet? inputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSetNullableFromJson(
  1. Object? inputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSet, [
  2. InputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSet? defaultValue
])

Implementation

enums.InputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSet?
    inputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSetNullableFromJson(
  Object? inputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSet, [
  enums.InputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSet?
      defaultValue,
]) {
  if (inputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSet == null) {
    return null;
  }
  return enums
          .InputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSet.values
          .firstWhereOrNull((e) =>
              e.value ==
              inputPortsHdmiHdmiPortNumberControlsColourSpaceColourGetSet) ??
      defaultValue;
}