strutStyle static method
Returns a StrutStyle from the specified map.
If the map is absent, returns null.
Otherwise (even if it has no keys), the StrutStyle is created from the
following keys: 'fontFamily(string),fontFamilyFallback([list] of [string]),fontSize(double),height(double),leadingDistribution([enumValue] of [TextLeadingDistribution]),leading(double),fontWeight([enumValue] of [FontWeight]),fontStyle([enumValue] of [FontStyle]),forceStrutHeight` (boolean).
Implementation
static Map<String, dynamic>? strutStyle(StrutStyle? style) {
if (style == null) return null;
return NotNullMap.from({
'fontFamily': style.fontFamily,
'fontFamilyFallback':
list<String, String?>(style.fontFamilyFallback, string),
'fontSize': style.fontSize,
'height': style.height,
'leadingDistribution': enumValue(style.leadingDistribution),
'leading': style.leading,
'fontWeight': enumValue(style.fontWeight),
'fontStyle': enumValue(style.fontStyle),
'forceStrutHeight': style.forceStrutHeight
});
}