OudsDisplayText.rich constructor

const OudsDisplayText.rich({
  1. Key? key,
  2. required OudsAnnotatedText text,
  3. Color? color,
  4. OudsDisplayTextSize size = OudsDisplayTextSize.large,
  5. int? maxLines,
  6. TextAlign? textAlign,
  7. TextOverflow? overflow,
  8. bool? softWrap,
})

Creates an OudsDisplayText whose content is composed of multiple spans, some of which can be colored independently of the others. Build text with buildOudsAnnotatedText to color part of the text, e.g. to highlight a word or phrase.

Implementation

const OudsDisplayText.rich({
  super.key,
  required OudsAnnotatedText text,
  this.color,
  this.size = OudsDisplayTextSize.large,
  this.maxLines,
  this.textAlign,
  this.overflow,
  this.softWrap,
}) : text = '',
     _annotatedText = text;