AppFontSizes class

Sistema flexible de tipografía con jerarquía escalable geométricamente.

Genera una escala tipográfica completa basada en un tamaño base (bodySmall) y un factor de escala geométrico. Cada nivel es el anterior multiplicado por el factor de escala, creando progresión armónica.

Jerarquía (10 niveles): bodySmall < body < bodyLarge < paragraphTitle < subheader < header < h3 < h2 < h1 < display

Uso:

// Instancia personalizada
final typography = AppFontSizes(
  bodySmall: 16,
  scaleFactor: AppFontSizesScaleFactors.normal,
);

Text('Title', style: TextStyle(fontSize: typography.h1));
Text('Body', style: TextStyle(fontSize: typography.body));

Recomendaciones:

  • Usa AppFontSizesPresets para configuraciones predefinidas
  • Usa AppFontSizesConstants para valores const
  • Elige UN scaleFactor por app para consistencia
  • Factores disponibles:
    • small (1.128): Denso, compacto
    • normal (1.174): Balanceado, Material Design
    • large (1.272): Clara jerarquía, moderno ⭐
    • extraLarge (1.618): Dramático, marketing

Ver también: AppFontSizesPresets, AppFontSizesScaleFactors

Constructors

AppFontSizes({double bodySmall = AppFontSizesConstants.bodySmall, double scaleFactor = AppFontSizesScaleFactors.large})
Crea un sistema de tipografía con base y escala especificadas.
const

Properties

body double
body - Texto estándar ⭐
no setter
bodyLarge double
bodyLarge - Texto destacado
no setter
bodySmall double
bodySmall - Texto más pequeño (base)
no setter
display double
display - Texto hero/display
no setter
h1 double
h1 - Heading nivel 1
no setter
h2 double
h2 - Heading nivel 2
no setter
h3 double
h3 - Heading nivel 3
no setter
hashCode int
The hash code for this object.
no setterinherited
header - Encabezados principales
no setter
paragraphTitle double
paragraphTitle - Títulos pequeños
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subheader double
subheader - Subtítulos de sección
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited