FTypography constructor
const
FTypography({
- String defaultFontFamily = 'packages/forui/Inter',
- TextStyle xs = const TextStyle(fontSize: 12, height: 1),
- TextStyle sm = const TextStyle(fontSize: 14, height: 1.25),
- TextStyle base = const TextStyle(fontSize: 16, height: 1.5),
- TextStyle lg = const TextStyle(fontSize: 18, height: 1.75),
- TextStyle xl = const TextStyle(fontSize: 20, height: 1.75),
- TextStyle xl2 = const TextStyle(fontSize: 22, height: 2),
- TextStyle xl3 = const TextStyle(fontSize: 30, height: 2.25),
- TextStyle xl4 = const TextStyle(fontSize: 36, height: 2.5),
- TextStyle xl5 = const TextStyle(fontSize: 48, height: 1),
- TextStyle xl6 = const TextStyle(fontSize: 60, height: 1),
- TextStyle xl7 = const TextStyle(fontSize: 72, height: 1),
- TextStyle xl8 = const TextStyle(fontSize: 96, height: 1),
Creates a FTypography.
Implementation
const FTypography({
this.defaultFontFamily = 'packages/forui/Inter',
this.xs = const TextStyle(fontSize: 12, height: 1),
this.sm = const TextStyle(fontSize: 14, height: 1.25),
this.base = const TextStyle(fontSize: 16, height: 1.5),
this.lg = const TextStyle(fontSize: 18, height: 1.75),
this.xl = const TextStyle(fontSize: 20, height: 1.75),
this.xl2 = const TextStyle(fontSize: 22, height: 2),
this.xl3 = const TextStyle(fontSize: 30, height: 2.25),
this.xl4 = const TextStyle(fontSize: 36, height: 2.5),
this.xl5 = const TextStyle(fontSize: 48, height: 1),
this.xl6 = const TextStyle(fontSize: 60, height: 1),
this.xl7 = const TextStyle(fontSize: 72, height: 1),
this.xl8 = const TextStyle(fontSize: 96, height: 1),
}) : assert(0 < defaultFontFamily.length, 'The defaultFontFamily should not be empty.');