title: How to round the double value upto two decimal points in dart?
body: <p>I have made this method that was called to perform functionality and do calculation but return number in double format for some calculations upto more than 10 decimal points. How can i make this code to show only upto 2 or 3 decimal points?</p>
  
  <pre><code>getProductPrice(int productID) {
      var cart = cartlist.firstWhere((cart) =&gt; cart.product.id == productID,
          orElse: () =&gt; null);
      if (cart != null) {
        var price= (cart.count)*(cart.product.price);
        return price;
        notifyListeners();
      } else {
        return 0.0;
      }
    }
  </code></pre>