title: Flutter animating pattern background image
body: <p>in flutter i'm trying to know how can i make animation for background image as pattern. for example: this is simple pattern background image which i would like to make animation like with moving the cloud</p>
  
  <p><img src="https://i.stack.imgur.com/sBoeM.jpg" width="250"/></p>
  
  <p>for example:</p>
  
  <p><a href="https://i.stack.imgur.com/ZbbEE.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZbbEE.gif" alt="enter image description here"></a></p>
  
  <p>by this code we can transfer image by drag, but i would like to make automate this animation not drag:</p>
  
  <pre><code>child: new GestureDetector(
    child: new Container(
      height: 80.0,
      child: new Transform.translate(
        offset: new Offset(foo, 0.0),
        child: new Image.asset("resources/scale.png"),
      ),
    ),
    onHorizontalDragUpdate: (d) { 
      if(d.primaryDelta &gt;= 1.0 || d.primaryDelta &lt;= - 1.0)
      {
        //print(d.primaryDelta); 
        setState(() {
          foo += d.primaryDelta;
        });
      }
    },
    )
  )
  </code></pre>