title: Null safety in flutter and Dart
body: <pre><code>class CalculatorBrain {
    final int height;
    final int weight;
  
    double _bmi;
  
    CalculatorBrain({required this.height, required this.weight});
  
    String calculateBMI() {
      double _bmi = weight / pow(height / 100, 2);
      return _bmi.toStringAsFixed(2);
    }
  
    String getResult() {
      if (_bmi &gt;= 25) {
        return &quot;OverWeight&quot;;
      } else if (_bmi &gt; 18.5 &amp;&amp; _bmi &lt; 25) {
        return &quot;Normal&quot;;
      } else {
        return &quot;UnderWeight&quot;;
      }
    }
  }
  </code></pre>
  <p>I have try adding late keyword and has used double ? _bmi but none of them works.</p>