title: how to display animated images in flutter
body: <p>In my app i want to represent rolling dice.
  currently when i roll the dice it move randomly to one of the six images without any animation.
  all what i want is to display animation scene,it takes 2 second moving between six images as if the dice is rolling.
  i tried with the <code>setState()</code> but it only work when i click the button is there is a way use <code>setState()</code> in <code>loop</code> and this is my state class </p>
  
  <pre><code>class _DicePageState extends State&lt;DicePage&gt; {
  
    int leftButtonImage = 2;
    int rightButtonImage = 3;
  
    void diceSoundPlayer(){
      final player = AudioCache();
      player.play('rollDice.mp3');
    }
    void changeDiceFace(){
  
        diceSoundPlayer();
        rightButtonImage = new Random().nextInt(6)+1;
        leftButtonImage = new Random().nextInt(6)+1;
  
    }
    @override
    Widget build(BuildContext context) {
      return Center(
        child: Row(
          children: &lt;Widget&gt;[
            Expanded(
                child: FlatButton(
                    onPressed: (){
                      changeDiceFace();
                      setState(() {
  
                      });
                    }
                    , child: Image.asset('images/dice$leftButtonImage.png'))),
            Expanded(
                child: FlatButton(
                    onPressed: () {
                      changeDiceFace();
                      setState(() {
  
                      });
                    }, child: Image.asset('images/dice$rightButtonImage.png'))),
          ],
        ),
      );
    }
    }
  </code></pre>
  
  <h2>abstract:</h2>
  
  <p>i have button and six images when i click button i want to display images Consecutively.</p>
  
  <h2>What is the package or what should i use to do that?</h2>