isValidBackgroundImageValue static method

bool isValidBackgroundImageValue(
  1. String value
)

Implementation

static bool isValidBackgroundImageValue(String value) {
  return (value.lastIndexOf(')') == value.length - 1) &&
      (value.startsWith('url(') ||
      value.startsWith('linear-gradient(') ||
      value.startsWith('repeating-linear-gradient(') ||
      value.startsWith('radial-gradient(') ||
      value.startsWith('repeating-radial-gradient(') ||
      value.startsWith('conic-gradient('));
}