GradientText constructor

GradientText({
  1. Key? key,
  2. required String text,
  3. required List<Color> colors,
  4. TextStyle? style,
  5. TextOverflow? overflow,
  6. TextAlign textAlign = TextAlign.start,
  7. TileMode tileMode = TileMode.clamp,
  8. Gradient? customGradient,
  9. GradientType type = GradientType.linear,
  10. GradientDirection gradientDirection = GradientDirection.ltr,
  11. GradientTransform? transform,
})

Implementation

GradientText(
    {Key? key,
      required this.text,
      required this.colors,
      this.style,
      this.overflow,
      this.textAlign = TextAlign.start,
      this.tileMode = TileMode.clamp,
      this.customGradient,
      this.type = GradientType.linear,
      this.gradientDirection = GradientDirection.ltr,
      this.transform})
    : assert(colors.length > 1,
'Colors cannot be null. You must specify a minimum of two colors'),
      super(key: key);