TextWidget constructor

const TextWidget(
  1. String text, {
  2. Key? key,
  3. TextAlign? textAlign,
  4. int? maxLines,
  5. TextOverflow? overflow,
  6. TextType textType = TextType.body,
  7. TextScaler? textScaler,
  8. Color? color,
  9. TextOptions? textOptions,
})

Implementation

const TextWidget(
  this.text, {
  super.key,
  this.textAlign,
  this.maxLines,
  this.overflow,
  this.textType = TextType.body,
  this.textScaler,
  this.color,
  this.textOptions,
}) : assert(
        textType != TextType.custom || textOptions != null,
        'TextType.custom requires textOptions to be provided.',
      );