AutoSizeText constructor

const AutoSizeText(
  1. String text, {
  2. TextStyle? style,
  3. double minFontSize = 8.0,
  4. double maxFontSize = double.infinity,
  5. TextAlign? textAlign,
  6. TextDirection? textDirection,
  7. int? maxLines,
  8. TextOverflow? overflow,
  9. AutoSizeGroup? group,
  10. Key? key,
})

Implementation

const AutoSizeText(
  this.text, {
  this.style,
  this.minFontSize = 8.0,
  this.maxFontSize = double.infinity,
  this.textAlign,
  this.textDirection,
  this.maxLines,
  this.overflow,
  this.group,
  super.key,
}) : assert(minFontSize > 0.0),
     assert(maxFontSize >= minFontSize),
     assert(maxLines == null || maxLines > 0),
     assert(
       overflow == null || maxLines != null,
       'Overflow can only be specified if maxLines is also specified.',
     );