title: How do I Convert Flutter slider double value to int
body: <p>I'm writing code for BMI calculator, and I'm using the slider for height and it returns a double type a long one. I tried <code>_startHeight.toInt()</code> but in vain. And Is there any way to show label without using division.</p>
  
  <p>Here is my slider code.  </p>
  
  <pre><code>               Slider(
                    value: _startHeight,
                    min: 1,
                    max: 100,
                    onChanged: (newHeight) {
                      setState(() {
                        _startHeight = newHeight;
                        _startHeight.toInt();
                        print(_startHeight);
                      });
                    },
                  ),
  </code></pre>
  
  <p>Thank you.</p>