Flutter slideTransition is not animating : <p>So I'm trying to create a trivial slide transition element in flutter and I'm having some difficulty. What the below does is wait for the animation time, and then just display the <code>Text("hello there sailor")</code>. I don't know why this is not animating - it seems very similar to this previous post that has a trivial example (<a href="https://stackoverflow.com/questions/53278792/sliding-animation-to-bottom-in-flutter?noredirect=1&amp;lq=1">Sliding animation to bottom in flutter</a>).</p>

<p>This is how I call the below code: <code>DeleteCheck(offsetBool: widget.model.deleteNotify, widthSlide: 0.50*width100)</code> where <code>double width100 = MediaQuery.of(context).size.width;</code>.</p>

<p>Does anyone see what I am doing wrong?</p>

<pre><code>class DeleteCheck extends StatefulWidget{

  final offsetBool;
  final double widthSlide;

  DeleteCheck({
    Key key, 
    this.offsetBool, 
    this.widthSlide
  }): super(key: key);

  @override 
  State&lt;StatefulWidget&gt; createState() {
    return new _MyDeleteCheck();
  }
}

class _MyDeleteCheck extends State&lt;DeleteCheck&gt; with TickerProviderStateMixin {
  AnimationController _controller;
  Animation&lt;Offset&gt; _offsetFloat; 

  @override
  void initState() {
    super.initState();

    _controller = AnimationController(
      vsync: this,
      duration: const Duration(seconds: 1),
    );

    _offsetFloat = Tween&lt;Offset&gt;(begin: Offset(widget.widthSlide, 0.0), end: Offset.zero)
        .animate(_controller);

    _offsetFloat.addListener((){
      setState((){});
    });

    _controller.forward();

  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    double height100 = MediaQuery.of(context).size.height;
    double width100 = MediaQuery.of(context).size.width;
    return new SlideTransition(
      position: _offsetFloat,
      child: Container(
        color: Colors.cyan,
        width: 0.525*width100-3.0,
        child: Text("hello there sailor")
      )
    );
  }
}
</code></pre>
