parseCSSBackgroundRepeat function

CSSBackgroundRepeat? parseCSSBackgroundRepeat(
  1. String repeat
)

Implementation

CSSBackgroundRepeat? parseCSSBackgroundRepeat(String repeat) {
  repeat = repeat.trim().toLowerCase();

  switch (repeat) {
    case 'repeat':
      return CSSBackgroundRepeat.repeat;
    case 'repeat-x':
      return CSSBackgroundRepeat.repeatX;
    case 'repeat-y':
      return CSSBackgroundRepeat.repeatY;
    case 'no-repeat':
      return CSSBackgroundRepeat.noRepeat;
    case 'space':
      return CSSBackgroundRepeat.space;
    case 'round':
      return CSSBackgroundRepeat.round;
    default:
      return null;
  }
}