fromCode static method

IntentColor? fromCode(
  1. int code
)

Looks a colour up by code; null if unknown.

Implementation

static IntentColor? fromCode(int code) {
  for (final c in values) {
    if (c.code == code) return c;
  }
  return null;
}