fromRawValue static method

IaCardLinkConsentStatus fromRawValue(
  1. String rawValue
)

Creates an instance from a raw string value.

Implementation

static IaCardLinkConsentStatus fromRawValue(String rawValue) {
  switch (rawValue) {
    case 'SHOW_CONSENT':
      return IaCardLinkConsentStatus.showConsent;
    case 'CONSENT_ACCEPTED':
      return IaCardLinkConsentStatus.consentAccepted;
    case 'CONSENT_DECLINED':
      return IaCardLinkConsentStatus.consentDeclined;
    default:
      throw ArgumentError('Unknown consent status: $rawValue');
  }
}