scaleTextStyle function
Returns a scaled copy of style, resolving a null fontSize against
defaultFontSize before multiplying.
Library-private — used by Theme scale methods that own a non-nullable
TextStyle slot. Not exported from lib/flutter_folderview.dart.
Implementation
TextStyle scaleTextStyle(
TextStyle? style,
double factor,
double defaultFontSize,
) {
final base = style ?? TextStyle(fontSize: defaultFontSize);
return base.copyWith(
fontSize: (base.fontSize ?? defaultFontSize) * factor,
letterSpacing:
base.letterSpacing != null ? base.letterSpacing! * factor : null,
);
}