AutoSizeText.rich constructor

const AutoSizeText.rich(
  1. TextSpan textSpan,
  2. {Key key,
  3. Key textKey,
  4. TextStyle style,
  5. StrutStyle strutStyle,
  6. double minFontSize = 12,
  7. double maxFontSize = double.infinity,
  8. double stepGranularity = 1,
  9. List<double> presetFontSizes,
  10. AutoSizeGroup group,
  11. TextAlign textAlign,
  12. TextDirection textDirection,
  13. Locale locale,
  14. bool softWrap,
  15. bool wrapWords = true,
  16. TextOverflow overflow,
  17. Widget overflowReplacement,
  18. double textScaleFactor,
  19. int maxLines,
  20. String semanticsLabel}
)

Creates a AutoSizeText widget with a TextSpan.

Implementation

const AutoSizeText.rich(
  this.textSpan, {
  Key key,
  this.textKey,
  this.style,
  this.strutStyle,
  this.minFontSize = 12,
  this.maxFontSize = double.infinity,
  this.stepGranularity = 1,
  this.presetFontSizes,
  this.group,
  this.textAlign,
  this.textDirection,
  this.locale,
  this.softWrap,
  this.wrapWords = true,
  this.overflow,
  this.overflowReplacement,
  this.textScaleFactor,
  this.maxLines,
  this.semanticsLabel,
})  : assert(textSpan != null,
          'A non-null TextSpan must be provided to a AutoSizeText.rich widget.'),
      data = null,
      super(key: key);