kitTextStyle function
Colour is left out: token styles carry none, and a theme's roles are coloured from its scheme.
Implementation
Map<String, Object?> kitTextStyle(TextStyle? s) => {
'fontFamily': s?.fontFamily,
'fontSize': s?.fontSize,
'fontWeight': s?.fontWeight?.value,
'height': s?.height,
'letterSpacing': s?.letterSpacing,
'fontFeatures': {
for (final f in s?.fontFeatures ?? const <FontFeature>[])
f.feature: f.value,
},
};