OudsHeadingText.rich constructor

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

Creates an OudsHeadingText 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 heading text, e.g. to highlight a word or phrase.

Implementation

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