textHeightBehavior static method
Returns a TextHeightBehavior from the specified map.
If the map is absent, returns null.
Otherwise (even if it has no keys), the TextHeightBehavior is created
from the following keys: 'applyHeightToFirstAscent(boolean; defaults to true),applyHeightToLastDescent(boolean, defaults to true), andleadingDistribution` (enumValue of TextLeadingDistribution, deafults
to TextLeadingDistribution.proportional).
Implementation
static Map<String, dynamic>? textHeightBehavior(
TextHeightBehavior? behavior) {
if (behavior == null) return null;
return NotNullMap.from({
'applyHeightToFirstAscent': behavior.applyHeightToFirstAscent,
'applyHeightToLastDescent': behavior.applyHeightToLastDescent,
'leadingDistribution': enumValue(behavior.leadingDistribution),
});
}