FontKey class abstract
FontKey (sealed class)
Represents a type-safe key for font families in the design system.
Purpose:
- Provides predefined font keys (
primary,secondary) for common usage. - Allows runtime custom font keys using
FontKey.custom('myFont'). - Ensures type safety and reduces errors compared to raw strings.
- Works seamlessly with FontRegistry and FontHelper.
Usage:
// Predefined fonts
final primaryKey = FontKey.primary;
final secondaryKey = FontKey.secondary;
// Custom font key
final customKey = FontKey.custom('brandX');
Constructors
- FontKey.custom(String key)
-
Custom font key for runtime fonts
factory
Properties
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