FTypography constructor

const FTypography({
  1. String defaultFontFamily = 'packages/forui/Inter',
  2. TextStyle xs = const TextStyle(fontSize: 12, height: 1),
  3. TextStyle sm = const TextStyle(fontSize: 14, height: 1.25),
  4. TextStyle base = const TextStyle(fontSize: 16, height: 1.5),
  5. TextStyle lg = const TextStyle(fontSize: 18, height: 1.75),
  6. TextStyle xl = const TextStyle(fontSize: 20, height: 1.75),
  7. TextStyle xl2 = const TextStyle(fontSize: 22, height: 2),
  8. TextStyle xl3 = const TextStyle(fontSize: 30, height: 2.25),
  9. TextStyle xl4 = const TextStyle(fontSize: 36, height: 2.5),
  10. TextStyle xl5 = const TextStyle(fontSize: 48, height: 1),
  11. TextStyle xl6 = const TextStyle(fontSize: 60, height: 1),
  12. TextStyle xl7 = const TextStyle(fontSize: 72, height: 1),
  13. 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.');