MaterialShadeLevels class abstract final

Canonical Material shade-intensity integer lists plus a seeded picker.

Centralizes the two halves of the shade ladder — the light band (lightShades, 50–400) and the dark band (darkShades, 500–900) — so callers index a MaterialColor from a single source of truth instead of re-typing the magic integers. shades is the concatenation of the two, in intensity order.

Declared abstract final so it can never be instantiated or subclassed: it is a namespace for static const data and one static helper, not a value type.

Example:

for (final int level in MaterialShadeLevels.shades) {
  print(Colors.blue[level]); // every rung of the blue swatch
}

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

randomShade({bool? isLightBackground, int? seed}) → int?
Returns a random Material shade integer, optionally constrained by band.

Constants

darkShades → const List<int>
The dark band: the five shades (500–900) that read as dark tones and therefore pair with a white foreground (see MaterialShadeName.onShade).
lightShades → const List<int>
The light band: the five shades (50–400) that read as light tones and therefore pair with a black foreground (see MaterialShadeName.onShade).
shades → const List<int>
The full shade ladder in intensity order: lightShades then darkShades.