title: How to increase the timing of a Fade animation in flutter using a counter method?
body: <p>I tried to implement a method on my fadeIn animation that increments the time in which each widget its showing. I want to do that automatically, so if i add one more widget, I dont have to manually set the delay of showing it, but just adding the counter method so it increases ++ for each widget. This is what I done so far:</p>
  <pre><code>enum AniProps { opacity, translateX }
  
  class FadeIn extends StatefulWidget {
    final int delaySecs;
    final Widget child;
  
  
    FadeIn(this.delaySecs, this.child);
  
    @override
    _FadeInState createState() =&gt; _FadeInState();
  }
  
  class _FadeInState extends State&lt;FadeIn&gt; {
    @override
    Widget build(BuildContext context) {
  
      var counter = 0;
      void incrementCounter() {
        setState(() {
          counter ++;
          print('Counter added');
          return counter.toInt();
        });
      }
      const durationSecs = 0.5;
      const opacityFade = 0.0;
      const translateXFade = 130.0;
      final tween = MultiTween&lt;AniProps&gt;()
        ..add(AniProps.opacity, opacityFade.tweenTo(1.0))
        ..add(AniProps.translateX, translateXFade.tweenTo(0.0));
  
      return PlayAnimation&lt;MultiTweenValues&lt;AniProps&gt;&gt;(
        delay: (widget.delaySecs).round().seconds,
        duration: durationSecs.seconds,
        tween: tween,
        child: widget.child,
        builder: (context, child, value) =&gt; Opacity(
          opacity: value.get(AniProps.opacity),
          child: Transform.translate(
            offset: Offset(value.get(AniProps.translateX), 0),
            child: child,
          ),
        ),
      );
    }
  }
  </code></pre>
  <p>Its not really working because i cannot wrap my widgets with a method:</p>
  <pre><code>Fade in (increasecounte, 
  container(................))
  </code></pre>
  <p>Please help.</p>