title: Dart, the type int used in the for loop must implement iterable
body: <p>I want to use Dart <code>for…in loop</code> in this function but I keep facing this error even though I declared the arr as an <code>Iterable&lt;int&gt;</code></p>
  <p>function:</p>
  <pre><code>void sumOfTwoNumbers(int targetSum, Iterable&lt;int&gt;  arr) {
    for (int i in arr.length-1) {
  //stuff
    }
  }
  </code></pre>
  <p>It's working with a normal for loop though, I don't know how can I fix this, for any help that would be appreciated</p>