GradientText constructor
- String text, {
- required Gradient gradient,
- Key? key,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextDirection? textDirection,
- Locale? locale,
- bool? softWrap,
- TextOverflow? overflow,
- double? textScaleFactor,
- int? maxLines,
- String? semanticsLabel,
- TextWidthBasis? textWidthBasis,
- TextHeightBehavior? textHeightBehavior,
- Color? selectionColor,
Constructs a GradientText widget.
text
is the text to be displayed.
gradient
is the gradient applied to the text.
style
is the text style to be applied.
strutStyle
is the strut style to be applied.
textAlign
is the text alignment to be applied.
textDirection
is the text direction to be applied.
locale
is the locale to be applied.
softWrap
controls whether text should break at soft line breaks.
overflow
determines how text should be handled when it overflows.
textScaleFactor
is the number of font pixels for each logical pixel.
maxLines
is the maximum number of lines for the text to span.
semanticsLabel
is a label for the text used by screen reading software.
textWidthBasis
determines how the width of the text is calculated.
textHeightBehavior
specifies how to handle the height of the text.
selectionColor
specifies the color of the selection highlight.
Implementation
const GradientText(
this.text, {
required this.gradient,
super.key,
this.style,
this.strutStyle,
this.textAlign,
this.textDirection,
this.locale,
this.softWrap,
this.overflow,
this.textScaleFactor,
this.maxLines,
this.semanticsLabel,
this.textWidthBasis,
this.textHeightBehavior,
this.selectionColor,
});