parseCSSBackgroundAttachment function

CSSBackgroundAttachment? parseCSSBackgroundAttachment(
  1. String attachment
)

Implementation

CSSBackgroundAttachment? parseCSSBackgroundAttachment(String attachment) {
  attachment = attachment.trim().toLowerCase();

  switch (attachment) {
    case 'scroll':
      return CSSBackgroundAttachment.scroll;
    case 'fixed':
      return CSSBackgroundAttachment.fixed;
    case 'local':
      return CSSBackgroundAttachment.local;
    default:
      return null;
  }
}