initialLineHeightScale method

double initialLineHeightScale(
  1. double defaultValue
)

Returns the line height of the first non-empty text in the span, or defaultValue if none.

Implementation

double initialLineHeightScale(double defaultValue) {
  return valueOfFirstDescendantOf(
        this,
        where: (s) => s is TextSpan && (s.text?.isNotEmpty ?? false),
        defaultValue: defaultValue,
        getValue: (s) => s is TextSpan ? s.style?.height : null,
        childrenOf: (s) => s is TextSpan ? s.children : null,
      ) ??
      defaultValue;
}