vocabulary property
The fields and values a host (or its model) may use, as data. Values are only ever added, never renamed.
Implementation
static final List<IntentField> vocabulary = List.unmodifiable([
IntentField(
name: 'families',
kind: IntentFieldKind.listOf,
description: 'visual styles to draw themes from',
maxItems: 3,
values: [
for (final f in ThemeFamily.enabledFamilies)
IntentValue(
f.name,
_familyDescriptions[f] ?? f.name,
steerable: steerableFamilies.contains(f),
),
],
),
const IntentField(
name: 'brightness',
kind: IntentFieldKind.oneOf,
description: 'light or dark overall',
values: [
IntentValue('light', 'light backgrounds, dark text'),
IntentValue('dark', 'dark backgrounds, light text'),
IntentValue('any', 'either'),
],
),
IntentField(
name: 'colors',
kind: IntentFieldKind.listOf,
description: 'main colours, most important first',
maxItems: maxColors,
values: [
for (final c in IntentColor.values) IntentValue(c.word, c.description),
],
),
IntentField(
name: 'chroma',
kind: IntentFieldKind.oneOf,
description: 'how colourful',
values: [
for (final c in IntentChroma.values) IntentValue(c.word, c.description),
],
),
IntentField(
name: 'harmony',
kind: IntentFieldKind.oneOf,
description: 'how the colours relate',
values: [
for (final e in harmonyWords.entries)
IntentValue(e.value, _harmonyDescriptions[e.key]!),
],
),
const IntentField(
name: 'name',
kind: IntentFieldKind.text,
description: 'a short evocative theme name',
maxWords: maxNameWords,
),
]);