resolveSubtitleFontSize method

double resolveSubtitleFontSize()

Resolves the subtitle font size.

Implementation

double resolveSubtitleFontSize() {
  if (this is TTileSize && (this as TTileSize).subtitleFont != null) {
    return (this as TTileSize).subtitleFont!;
  }
  return switch (this) {
    TTileSize.h1 => 15.0,
    TTileSize.h2 => 14.0,
    TTileSize.h3 => 13.0,
    TTileSize.h4 => 12.5,
    TTileSize.h5 => 12.0,
    TTileSize.h6 => 11.0,
    TTileSize.h7 => 10.0,
    TTileSize.lg => 14.0,
    TTileSize.md => 13.0,
    TTileSize.sm => 12.0,
    _ => (font * 0.85).clamp(10.0, 16.0),
  };
}