serviceAgreementStatusDTONullableFromJson function

ServiceAgreementStatusDTO? serviceAgreementStatusDTONullableFromJson(
  1. Object? serviceAgreementStatusDTO, [
  2. ServiceAgreementStatusDTO? defaultValue
])

Implementation

enums.ServiceAgreementStatusDTO? serviceAgreementStatusDTONullableFromJson(
  Object? serviceAgreementStatusDTO, [
  enums.ServiceAgreementStatusDTO? defaultValue,
]) {
  if (serviceAgreementStatusDTO == null) {
    return null;
  }
  return enums.ServiceAgreementStatusDTO.values
          .firstWhereOrNull((e) => e.value == serviceAgreementStatusDTO) ??
      defaultValue;
}