SeoText.headingLevel constructor

const SeoText.headingLevel(
  1. String text, {
  2. Key? key,
  3. required int level,
  4. TextStyle? style,
  5. TextAlign? textAlign,
  6. int? maxLines,
  7. TextOverflow? overflow,
  8. TextDirection? textDirection,
})

Creates an SEO-friendly heading with custom level (1-6)

Implementation

const SeoText.headingLevel(
  this.text, {
  super.key,
  required int level,
  this.style,
  this.textAlign,
  this.maxLines,
  this.overflow,
  this.textDirection,
}) : htmlTag = 'h${level < 1 ? 1 : (level > 6 ? 6 : level)}',
     _isHeading = true;