TextTheme constructor Null safety

const TextTheme(
  1. {TextStyle? headline1,
  2. TextStyle? headline2,
  3. TextStyle? headline3,
  4. TextStyle? headline4,
  5. TextStyle? headline5,
  6. TextStyle? headline6,
  7. TextStyle? subtitle1,
  8. TextStyle? subtitle2,
  9. TextStyle? bodyText1,
  10. TextStyle? bodyText2,
  11. TextStyle? caption,
  12. TextStyle? button,
  13. TextStyle? overline}
)

Creates a text theme that uses the given values.

Rather than creating a new text theme, consider using Typography.black or Typography.white, which implement the typography styles in the material design specification:

material.io/design/typography/#type-scale

If you do decide to create your own text theme, consider using one of those predefined themes as a starting point for copyWith or apply.

Implementation

const TextTheme({
  this.headline1,
  this.headline2,
  this.headline3,
  this.headline4,
  this.headline5,
  this.headline6,
  this.subtitle1,
  this.subtitle2,
  this.bodyText1,
  this.bodyText2,
  this.caption,
  this.button,
  this.overline,
});