encodeTextHeightBehavior static method
Encodes the given value
to the JSON representation.
{
"applyHeightToFirstAscent": "<bool>",
"applyHeightToLastDescent": "<bool>",
"leadingDistribution": "<TextLeadingDistribution>"
}
Implementation
static Map<String, dynamic>? encodeTextHeightBehavior(
TextHeightBehavior? value,
) {
Map<String, dynamic>? result;
if (value != null) {
result = {
'applyHeightToFirstAscent': value.applyHeightToFirstAscent,
'applyHeightToLastDescent': value.applyHeightToLastDescent,
'leadingDistribution': encodeTextLeadingDistribution(
value.leadingDistribution,
),
};
}
return _stripNull(result);
}