getTween method

Tween<double> getTween()

Implementation

Tween<double> getTween() {
  switch (variant) {
    case NextBounceVariant.bounceInTop:
      return Tween<double>(begin: initialPosition * 1, end: 0);
    case NextBounceVariant.bounceInBottom:
      return Tween<double>(begin: initialPosition * -1, end: 0);
    case NextBounceVariant.bounceInLeft:
      return Tween<double>(begin: initialPosition * -1, end: 0);
    case NextBounceVariant.bounceInRight:
      return Tween<double>(begin: initialPosition, end: 0);
    default:
      return Tween<double>(begin: initialPosition * -1, end: 0);
  }
}