title: How to control gif animation in Flutter?
body: <p>I'm trying to restart an animated gif on Flutter. The gif image loads from network without a problem and animates after loading. I need to restart the animation on tapping a button. </p>
  
  <p>Tried so far:
  - setState
  - change Key to some other unique key and setState to rebuild.</p>
  
  <p>Solution as @chemamolins 's suggestion:</p>
  
  <pre><code>int _robotReloadCount=0;
  </code></pre>
  
  <p>....</p>
  
  <pre><code>GestureDetector(
  onTap: () {
    onTapRobot();
  },
  child: Center(
    child: Container(
     margin: EdgeInsets.only(top: 55.0, bottom: 5.0),
     height: 150.0,
     width: 150.0,
     child:
      FadeInImage(
        key: this._robotImageKey,
        placeholder: AssetImage('assets/common/robot_placeholder.png'),
        image: NetworkImage(snapshot.data['robot_image_path'] +"robot_level" +snapshot.data['robot_level'].toString() +".gif"+"?"+this._robotReloadCount.toString()))),
    ),
  ),
  </code></pre>
  
  <p>....</p>
  
  <pre><code>onTapRobot() async{
      setState(() {
        this._robotReloadCount++;
      });
    }
  </code></pre>