AppFontSizesConstants class

Tamaños de fuente constantes (compile-time) con configuración por defecto.

Valores const calculados con base 14px y escala large (1.272). Úsalos cuando necesites expresiones constantes en tiempo de compilación.

Cuándo usar:

  • AppFontSizesConstants: Constructores const, valores por defecto
  • AppFontSizes: Configuración runtime, tamaños dinámicos
  • AppFontSizesPresets: Configuraciones predefinidas listas para usar

Ejemplo:

// ✅ Correcto: const constructor
const TextStyle(fontSize: AppFontSizesConstants.body)

// ✅ Correcto: default parameter
Widget buildText({double fontSize = AppFontSizesConstants.body}) {...}

// ❌ Error: AppFontSizes no es const
const TextStyle(fontSize: AppFontSizes().body)  // No compila

Ver también: AppFontSizes, AppFontSizesPresets

Constructors

AppFontSizesConstants()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Constants

body → const double
17.8px - body (14 × 1.272)
bodyLarge → const double
22.6px - bodyLarge (17.8 × 1.272)
bodySmall → const double
14.0px - bodySmall (base)
display → const double
121.4px - display (95.4 × 1.272)
h1 → const double
95.4px - h1 (75.0 × 1.272)
h2 → const double
75.0px - h2 (59.0 × 1.272)
h3 → const double
59.0px - h3 (46.4 × 1.272)
46.4px - header (36.5 × 1.272)
paragraphTitle → const double
28.7px - paragraphTitle (22.6 × 1.272)
subheader → const double
36.5px - subheader (28.7 × 1.272)