payloadTextHeightBehavior function

JsonMap payloadTextHeightBehavior({
  1. bool? applyHeightToFirstAscent,
  2. bool? applyHeightToLastDescent,
  3. TextLeadingDistribution? leadingDistribution,
})

Sparse TextHeightBehavior payload; omits unset fields.

Implementation

JsonMap payloadTextHeightBehavior({
  bool? applyHeightToFirstAscent,
  bool? applyHeightToLastDescent,
  TextLeadingDistribution? leadingDistribution,
}) {
  return {
    'applyHeightToFirstAscent': ?applyHeightToFirstAscent,
    'applyHeightToLastDescent': ?applyHeightToLastDescent,
    if (leadingDistribution != null)
      'leadingDistribution': payloadEnum(leadingDistribution),
  };
}