GradientText constructor
const
GradientText(
- String text, {
- required List<
Color> colors, - GradientDirection? gradientDirection = GradientDirection.ltr,
- GradientType gradientType = GradientType.linear,
- Key? key,
- TextOverflow? overflow,
- double radius = 1.0,
- TextStyle? style,
- TextAlign? textAlign,
- List<
double> ? stops, - double? textScaleFactor,
- int? maxLines,
Implementation
const GradientText(
this.text, {
required this.colors,
this.gradientDirection = GradientDirection.ltr,
this.gradientType = GradientType.linear,
super.key,
this.overflow,
this.radius = 1.0,
this.style,
this.textAlign,
this.stops,
this.textScaleFactor,
this.maxLines,
}) : assert(
colors.length >= 2,
'Colors list must have at least two colors',
);