init method

void init(
  1. MovingBackground data
)

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;
}