ColorEffect constructor
ColorEffect(
- Color color,
- EffectController controller, {
- double opacityFrom = 0,
- double opacityTo = 1,
- String? paintId,
- void onComplete()?,
- ComponentKey? key,
Implementation
ColorEffect(
this.color,
EffectController controller, {
double opacityFrom = 0,
double opacityTo = 1,
this.paintId,
void Function()? onComplete,
super.key,
}) : assert(
opacityFrom >= 0 &&
opacityFrom <= 1 &&
opacityTo >= 0 &&
opacityTo <= 1,
'Opacity value should be between 0 and 1',
),
_tween = Tween(begin: opacityFrom, end: opacityTo),
super(controller, onComplete: onComplete);