FeedEntry.ofSpec constructor
FeedEntry.ofSpec(
- ThemeSpec spec
The entry for spec (heroes by id, everything else by recipe). A
steered spec's entry takes ThemeSpec.name as its intent's name, so
it regenerates the same spec.
Implementation
factory FeedEntry.ofSpec(ThemeSpec spec) =>
spec.variant == ThemeVariant.hero && spec.heroId != null
? FeedEntry.hero(spec.heroId!)
: FeedEntry.generated(
seed: spec.seed,
family: spec.family,
engineVersion: spec.engineVersion,
intent: spec.variant == ThemeVariant.steered && spec.intent != null
? spec.intent!.withName(spec.name)
: null,
centred: spec.intentCentred,
);