of static method Null safety

X11Colors of(
  1. String name
)

Implementation

static X11Colors of(String name) {
  if (name.isEmpty) {
    return X11Colors.White;
  }
  for (final webColor in X11Colors.values) {
    if (webColor.name == name.toLowerCase()) {
      return webColor;
    }
  }
  return X11Colors.None;
}