toSanitizationWarningReason method

SanitizationWarningReason toSanitizationWarningReason()

Implementation

SanitizationWarningReason toSanitizationWarningReason() {
  switch (this) {
    case 'DISALLOWED_ELEMENT_REMOVED':
      return SanitizationWarningReason.disallowedElementRemoved;
    case 'DISALLOWED_ATTRIBUTE_REMOVED':
      return SanitizationWarningReason.disallowedAttributeRemoved;
    case 'INVALID_ATTRIBUTE_VALUE_REMOVED':
      return SanitizationWarningReason.invalidAttributeValueRemoved;
  }
  throw Exception('$this is not known in enum SanitizationWarningReason');
}