NomoText constructor

const NomoText(
  1. String text, {
  2. Key? key,
  3. TextStyle? style,
  4. TextAlign? textAlign,
  5. TextDirection? textDirection,
  6. Color? color,
  7. FontWeight? fontWeight,
  8. TextOverflow? overflow,
  9. int? maxLines,
  10. bool? fitHeight,
  11. List<double>? fontSizes,
  12. double decreaseBy = 1,
  13. double minFontSize = 6,
  14. double? opacity,
  15. bool translate = true,
  16. double? fontSize,
  17. bool fit = false,
  18. bool useInheritedTheme = false,
  19. String textShortener(
    1. String text,
    2. int length
    )?,
})

Implementation

const NomoText(
  this.text, {
  super.key,
  this.style,
  this.textAlign,
  this.textDirection,
  this.color,
  this.fontWeight,
  this.overflow,
  this.maxLines,
  this.fitHeight,
  this.fontSizes,
  this.decreaseBy = 1,
  this.minFontSize = 6,
  this.opacity,
  this.translate = true,
  this.fontSize,
  this.fit = false,
  this.useInheritedTheme = false,
  this.textShortener,
})  : assert(
        fontSizes == null || fontSizes.length > 0,
        'fontSizes must be a list of at least one value',
      ),
      assert(
        (fitHeight != null && fontSizes == null && maxLines == null) ||
            fitHeight == null,
        'Cant use FontSizes || maxLines with fitHeight',
      );