FontHelper class
Font Helper
Centralized helper for creating TextStyle objects that:
- Automatically scale with screen size
- Resolve font family from AppTypography
- Convert custom font weight abstractions to Flutter FontWeight
- Optionally apply line height (line spacing)
⚠️ Important:
inherit: false is intentionally used to prevent DefaultTextStyle
or Theme text styles from overriding design-system decisions.
Constructors
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
Static Methods
-
style(
{required BuildContext context, double size = 14, FontWeightProtocol weight = const _DefaultFontWeight(), Color color = Colors.black, double? lineHeight, FontKey fontKey = FontKey.primary}) → TextStyle - Creates a scaled, theme-aware TextStyle.