AnimateGradient constructor

const AnimateGradient({
  1. Key? key,
  2. required List<Color> primaryColors,
  3. required List<Color> secondaryColors,
  4. Widget? child,
  5. Alignment primaryBegin = Alignment.topLeft,
  6. Alignment primaryEnd = Alignment.topRight,
  7. Alignment secondaryBegin = Alignment.bottomLeft,
  8. Alignment secondaryEnd = Alignment.bottomRight,
  9. AlignmentGeometry? primaryBeginGeometry,
  10. AlignmentGeometry? primaryEndGeometry,
  11. AlignmentGeometry? secondaryBeginGeometry,
  12. AlignmentGeometry? secondaryEndGeometry,
  13. TextDirection textDirectionForGeometry = TextDirection.ltr,
  14. AnimationController? controller,
  15. Duration duration = const Duration(seconds: 4),
  16. bool animateAlignments = true,
  17. bool reverse = true,
})

Implementation

const AnimateGradient({
  Key? key,
  required this.primaryColors,
  required this.secondaryColors,
  this.child,
  this.primaryBegin = Alignment.topLeft,
  this.primaryEnd = Alignment.topRight,
  this.secondaryBegin = Alignment.bottomLeft,
  this.secondaryEnd = Alignment.bottomRight,
  this.primaryBeginGeometry,
  this.primaryEndGeometry,
  this.secondaryBeginGeometry,
  this.secondaryEndGeometry,
  this.textDirectionForGeometry = TextDirection.ltr,
  this.controller,
  this.duration = const Duration(seconds: 4),
  this.animateAlignments = true,
  this.reverse = true,
})  : assert(primaryColors.length >= 2),
      assert(primaryColors.length == secondaryColors.length),
      super(key: key);