ThemeIntent constructor
ThemeIntent({
- Iterable<
ThemeFamily> families = const [], - ThemeBrightness? brightness,
- Iterable<
IntentColor> colors = const [], - IntentChroma? chroma,
- HarmonyScheme? harmony,
- (int, int)? hueRange,
- String? name,
An intent. Lists are de-duplicated and capped; disabled families are
dropped; name is trimmed to maxNameWords words.
Implementation
ThemeIntent({
Iterable<ThemeFamily> families = const [],
this.brightness,
Iterable<IntentColor> colors = const [],
this.chroma,
this.harmony,
(int, int)? hueRange,
String? name,
}) : families = List.unmodifiable(
_distinct([
for (final f in families)
if (f.enabled) f,
]),
),
colors = List.unmodifiable(_distinct(colors).take(maxColors)),
hueRange = hueRange == null
? null
: (_wrapDeg(hueRange.$1), _wrapDeg(hueRange.$2)),
name = _cleanName(name);