title: How to convert a double to an int in Dart?
body: <p>The following produces the below error:</p>
  
  <pre><code>int calc_ranks(ranks)
  {
    double multiplier = .5;
    return multiplier * ranks;
  }
  </code></pre>
  
  <p>The return type <code>double</code> is not a <code>int</code>, as defined by the method <code>calc_ranks</code>. How do I round/cast to an <code>int</code>?</p>