FTypography constructor

const FTypography({
  1. String defaultFontFamily = 'packages/forui/Inter',
  2. TextStyle xs3 = const TextStyle(fontSize: 10, height: 1),
  3. TextStyle xs2 = const TextStyle(fontSize: 12, height: 1),
  4. TextStyle xs = const TextStyle(fontSize: 14, height: 1.25),
  5. TextStyle sm = const TextStyle(fontSize: 16, height: 1.5),
  6. TextStyle md = const TextStyle(fontSize: 18, height: 1.75),
  7. TextStyle lg = const TextStyle(fontSize: 20, height: 1.75),
  8. TextStyle xl = const TextStyle(fontSize: 22, height: 2),
  9. TextStyle xl2 = const TextStyle(fontSize: 30, height: 2.25),
  10. TextStyle xl3 = const TextStyle(fontSize: 36, height: 2.5),
  11. TextStyle xl4 = const TextStyle(fontSize: 48, height: 1),
  12. TextStyle xl5 = const TextStyle(fontSize: 60, height: 1),
  13. TextStyle xl6 = const TextStyle(fontSize: 72, height: 1),
  14. TextStyle xl7 = const TextStyle(fontSize: 96, height: 1),
  15. TextStyle xl8 = const TextStyle(fontSize: 108, height: 1),
})

Creates a FTypography that defaults to touch font sizes.

Implementation

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