homeownerConsentActionV2NullableFromJson function

HomeownerConsentActionV2? homeownerConsentActionV2NullableFromJson(
  1. Object? homeownerConsentActionV2, [
  2. HomeownerConsentActionV2? defaultValue
])

Implementation

enums.HomeownerConsentActionV2? homeownerConsentActionV2NullableFromJson(
  Object? homeownerConsentActionV2, [
  enums.HomeownerConsentActionV2? defaultValue,
]) {
  if (homeownerConsentActionV2 == null) {
    return null;
  }
  return enums.HomeownerConsentActionV2.values
          .firstWhereOrNull((e) => e.value == homeownerConsentActionV2) ??
      defaultValue;
}