encodeTextHeightBehavior static method

Map<String, dynamic>? encodeTextHeightBehavior(
  1. TextHeightBehavior? value
)

Encodes the given value to the JSON representation.

{
  "applyHeightToFirstAscent": <bool>,
  "applyHeightToLastDescent": <bool>
}

Implementation

static Map<String, dynamic>? encodeTextHeightBehavior(
  TextHeightBehavior? value,
) {
  Map<String, dynamic>? result;

  if (value != null) {
    result = {
      'applyHeightToFirstAscent': value.applyHeightToFirstAscent,
      'applyHeightToLastDescent': value.applyHeightToLastDescent,
    };
  }

  return result;
}