generate method
Génère les règles CSS correspondantes au token en utilisant le thème fourni.
Implementation
@override
List<JxCssRule> generate(JxClassToken token, JxThemeContract theme) {
final declarations = values[token.value];
if (declarations == null) {
throw JxRuleException(
'Invalid value "${token.value}" for "${token.identifier}".',
);
}
return [
JxCssRule(
selector: escapeSelector(token.raw),
declarations: [
for (final entry in declarations.entries)
JxCssDeclaration(
property: entry.key,
value: entry.value,
isImportant: token.isImportant,
),
],
),
];
}