NomoText constructor

const NomoText(
  1. String text,
  2. {dynamic key,
  3. dynamic style,
  4. dynamic textAlign,
  5. dynamic textDirection,
  6. dynamic color,
  7. dynamic fontWeight,
  8. dynamic overflow,
  9. int? maxLines,
  10. bool? fitHeight,
  11. List<double>? fontSizes,
  12. double decreaseBy = 1,
  13. double minFontSize = 6}
)

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,
})  : 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",
      );