BadText.selectable constructor

const BadText.selectable(
  1. String text, {
  2. Key? key,
  3. String? fontFamily,
  4. Color? color,
  5. double fontSize = 16,
  6. FontWeight fontWeight = FontWeight.w400,
  7. double? lineHeight,
  8. bool underline = false,
  9. bool italic = false,
  10. double letterSpacing = 0.0,
  11. List<Shadow>? shadows,
  12. TextAlign textAlign = TextAlign.start,
  13. TextDirection textDirection = TextDirection.ltr,
  14. int? maxLines,
})

NOTE: if maxLines is specified, the text may scroll horizontally.

Implementation

const BadText.selectable(
  this.text, {
  super.key,
  this.fontFamily,
  this.color,
  this.fontSize = 16,
  this.fontWeight = FontWeight.w400,
  double? lineHeight,
  this.underline = false,
  this.italic = false,
  this.letterSpacing = 0.0,
  this.shadows,
  this.textAlign = TextAlign.start,
  this.textDirection = TextDirection.ltr,
  this.maxLines,
})  : selectable = true,
      lineHeight = lineHeight ?? fontSize * 1.2,
      overflow = null;