applyToTextStyle static method

TextStyle applyToTextStyle(
  1. BuildContext context,
  2. FlyStyle style,
  3. TextStyle? baseStyle
)

Applies leading styling to a TextStyle using copyWith

Implementation

static TextStyle applyToTextStyle(
  BuildContext context,
  FlyStyle style,
  TextStyle? baseStyle,
) {
  final leadingValue = resolve(context, style);

  if (leadingValue == null) {
    return baseStyle ?? const TextStyle();
  }

  // Use copyWith to merge leading with existing style
  return (baseStyle ?? const TextStyle()).copyWith(height: leadingValue);
}