call method

Widget call()
override

Implementation

Widget call() {
  Widget child = data.child ?? SizedBox();
  for (Tween tween in _tween) {
    if (data.animation == null) continue;
    if (tween is _Tween<double>) {
      if (tween.type == _TweenType.scale) child = ScaleTransition(scale: tween.animate(data.animation!), child: child);
      if (tween.type == _TweenType.height) child = SizeTransition(axis: Axis.vertical, sizeFactor: tween.animate(data.animation!), child: child);
      if (tween.type == _TweenType.width) child = SizeTransition(axis: Axis.horizontal, sizeFactor: tween.animate(data.animation!), child: child);
      if (tween.type == _TweenType.opacity) child = FadeTransition(opacity: tween.animate(data.animation!), child: child);
      if (tween.type == _TweenType.rotation) child = RotationTransition(turns: tween.animate(data.animation!), child: child);
    }
    if (tween is _Tween<Offset>) {
      if (tween.type == _TweenType.translate) child = SlideTransition(position: tween.animate(data.animation!), child: child);
    }
    if (tween is Tween<Config>) {
      if (tween is DecorTween) child = DecorTransition(decor: tween.animate(data.animation!), child: child);
      if (tween is InkTween) child = InkTransition(ink: tween.animate(data.animation!), child: child);
      if (tween is PhotoTween) child = PhotoTransition(photo: tween.animate(data.animation!), child: child);
      if (tween is RadiiTween) child = RadiiTransition(radii: tween.animate(data.animation!), child: child);
      if (tween is AceTween) child = AceTransition(ace: tween.animate(data.animation!), child: child);
      if (tween is TxtTween) child = TxtTransition(txt: tween.animate(data.animation!), child: child);
      if (tween is X3DTween) child = X3DTransition(x3D: tween.animate(data.animation!), child: child);
    }
    return child;
  }
  return child;
}