init method
Implementation
void init(MovingBackground data) {
if (animationType == AnimationType.mixed) {
duration = duration?? const Duration(seconds: 2);
}
child = data.child;
backgroundColor = data.backgroundColor;
animationType = data.animationType;
duration = data.duration;
}