TextStyle constructor

const TextStyle({bool inherit: true, Color color, double fontSize, FontWeight fontWeight, FontStyle fontStyle, double letterSpacing, double wordSpacing, TextBaseline textBaseline, double height, Locale locale, Paint foreground, Paint background, List<Shadow> shadows, TextDecoration decoration, Color decorationColor, TextDecorationStyle decorationStyle, String debugLabel, String fontFamily, String package })

Creates a text style.

The package argument must be non-null if the font family is defined in a package. It is combined with the fontFamily argument to set the fontFamily property.

Implementation

const TextStyle({
  this.inherit = true,
  this.color,
  this.fontSize,
  this.fontWeight,
  this.fontStyle,
  this.letterSpacing,
  this.wordSpacing,
  this.textBaseline,
  this.height,
  this.locale,
  this.foreground,
  this.background,
  this.shadows,
  this.decoration,
  this.decorationColor,
  this.decorationStyle,
  this.debugLabel,
  String fontFamily,
  String package,
}) : fontFamily = package == null ? fontFamily : 'packages/$package/$fontFamily',
     assert(inherit != null),
     assert(color == null || foreground == null, _kColorForegroundWarning);