AutoSizeText constructor

const AutoSizeText(
  1. String data, {
  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.

If the style argument is null, the text will use the style from the closest enclosing DefaultTextStyle.

Implementation

const AutoSizeText(
  String this.data, {
  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,
})  : textSpan = null,
      super(key: key);