fontSize method

double fontSize(
  1. double size
)

Scale font size responsively.

Uses configurable font scale factors (default: mobile 1x, tablet 1.15x, desktop 1.3x). Intentionally uses smaller multipliers than scale to prevent oversized text.

Implementation

double fontSize(double size) {
  final config = _config;
  if (isDesktop) return size * config.desktopFontScale;
  if (isTablet) return size * config.tabletFontScale;
  return size * config.mobileFontScale;
}