addLineHeight static method

TextStyle addLineHeight(
  1. TextStyle textStyle,
  2. String value
)

Creates a TextStyle to handle CSS line-height

Implementation

static TextStyle addLineHeight(TextStyle textStyle, String value) {
  try {
    return textStyle.copyWith(height: double.parse(value));
  } catch (_) {
    return textStyle;
  }
}