GradientText constructor

const GradientText(
  1. String text, {
  2. required List<Color> colors,
  3. GradientDirection? gradientDirection = GradientDirection.ltr,
  4. GradientType gradientType = GradientType.linear,
  5. Key? key,
  6. TextOverflow? overflow,
  7. double radius = 1.0,
  8. TextStyle? style,
  9. TextAlign? textAlign,
  10. List<double>? stops,
  11. double? textScaleFactor,
  12. 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',
      );