title: How to rotate an image using Flutter AnimationController and Transform?
body: <p>I have star png image and I need to rotate the star using Flutter AnimationController and Transformer. I couldn't find any documents or example for image rotation animation. </p>
  
  <p>Any idea How to rotate an image using Flutter AnimationController and Transform?</p>
  
  <p>UPDATE:</p>
  
  <pre><code>class _MyHomePageState extends State&lt;MyHomePage&gt;  with TickerProviderStateMixin {
  
    AnimationController animationController;
  
    @override
    void initState() {
      super.initState();
      animationController = new AnimationController(
        vsync: this,
        duration: new Duration(milliseconds: 5000),
      );
      animationController.forward();
      animationController.addListener(() {
        setState(() {
          if (animationController.status == AnimationStatus.completed) {
            animationController.repeat();
          }
        });
      });
    }
  
    @override
    Widget build(BuildContext context) {
      return new Container(
        alignment: Alignment.center,
        color: Colors.white,
        child: new AnimatedBuilder(
          animation: animationController,
          child: new Container(
            height: 80.0,
            width: 80.0,
            child: new Image.asset('images/StarLogo.png'),
          ),
          builder: (BuildContext context, Widget _widget) {
            return new Transform.rotate(
              angle: animationController.value,
              child: _widget,
            );
          },
        ),
      );
    }
  }
  </code></pre>