display property
double
get
display
Display text for hero sections and large titles.
Size: h1 × scaleFactor (default: 95.3 × 1.27 = ~121.1px)
Use cases:
- Hero text
- Splash screen titles
- Onboarding headings
- Marketing headers
- Empty state messages
Example:
Text(
'Get Started',
style: TextStyle(
fontSize: appFontSizes.display,
fontWeight: FontWeight.bold,
letterSpacing: -0.5,
),
)
Note: Display sizes may need to be reduced on smaller screens to prevent overflow. Consider using AppFontSizesExtension.getResponsiveFontSize.
Implementation
double get display => h1 * _scaleFactor;