CustomTextWidget constructor

const CustomTextWidget({
  1. Key? key,
  2. required String text,
  3. int maxLines = 1,
  4. TextAlign textAlign = TextAlign.start,
  5. Color? color,
  6. FontWeight fontWeight = FontWeight.w500,
  7. String fontFamily = 'regular',
  8. double fontSize = 16,
  9. double? minFontSize,
  10. double? maxFontSize,
  11. bool selectable = false,
  12. bool autoScale = false,
  13. TextOverflow overflow = TextOverflow.ellipsis,
  14. TextDecoration? decoration,
  15. List<Shadow>? shadows,
  16. Gradient? gradient,
  17. bool animatedGradient = false,
  18. bool richTextMode = false,
  19. void onTapWord(
    1. String word
    )?,
  20. TextPresets? preset,
})

Creates a CustomTextWidget.

All parameters are optional except text. Example:

CustomTextWidget(
  text: 'Hello @user! #Flutter',
  richTextMode: true,
);

Implementation

const CustomTextWidget({
  super.key,
  required this.text,
  this.maxLines = 1,
  this.textAlign = TextAlign.start,
  this.color,
  this.fontWeight = FontWeight.w500,
  this.fontFamily = 'regular',
  this.fontSize = 16,
  this.minFontSize,
  this.maxFontSize,
  this.selectable = false,
  this.autoScale = false,
  this.overflow = TextOverflow.ellipsis,
  this.decoration,
  this.shadows,
  this.gradient,
  this.animatedGradient = false,
  this.richTextMode = false,
  this.onTapWord,
  this.preset,
});