AnimateGradient constructor
const
AnimateGradient({
- Key? key,
- required List<
Color> primaryColors, - required List<
Color> secondaryColors, - Widget? child,
- Alignment primaryBegin = Alignment.topLeft,
- Alignment primaryEnd = Alignment.topRight,
- Alignment secondaryBegin = Alignment.bottomLeft,
- Alignment secondaryEnd = Alignment.bottomRight,
- AlignmentGeometry? primaryBeginGeometry,
- AlignmentGeometry? primaryEndGeometry,
- AlignmentGeometry? secondaryBeginGeometry,
- AlignmentGeometry? secondaryEndGeometry,
- TextDirection textDirectionForGeometry = TextDirection.ltr,
- AnimationController? controller,
- Duration duration = const Duration(seconds: 4),
- bool animateAlignments = true,
- 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);