OudsBodyText.rich constructor

const OudsBodyText.rich({
  1. Key? key,
  2. required OudsAnnotatedText text,
  3. Color? color,
  4. OudsBodyTextSize size = OudsBodyTextSize.medium,
  5. OudsTextWeight weight = OudsTextWeight.defaultWeight,
  6. void onLinkTap(
    1. String url
    )?,
  7. int? maxLines,
  8. TextAlign? textAlign,
  9. TextOverflow? overflow,
  10. bool? softWrap,
})

Creates an OudsBodyText 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 OudsBodyText.rich({
  super.key,
  required OudsAnnotatedText text,
  this.color,
  this.size = OudsBodyTextSize.medium,
  this.weight = OudsTextWeight.defaultWeight,
  this.onLinkTap,
  this.maxLines,
  this.textAlign,
  this.overflow,
  this.softWrap,
}) : text = '',
     _annotatedText = text;