title: dart says "non-nullable variable must be initialized before use", even after assigning with if, else block
body: <p>Trying to do this. Would be neat if I could avoid implementing the full code in both condition.</p>
  <pre><code>  String dateToday;
    //if time is past 6pm, get next date:
    if (fetchTime.hour &gt; 18){
      final dateToday = DateFormat('dd-MM-yyyy').format(fetchTime.add(Duration(days: 1)));
    }
    else{
      final dateToday = DateFormat('dd-MM-yyyy').format(fetchTime);
    }
  
    final Map&lt;String, String&gt; params = {
        'district_id': '$districtId',
        'date': dateToday                //ERROR HERE  &lt;------
    }
  </code></pre>
  <p>ERROR:</p>
  <blockquote>
  <p>The non-nullable local variable 'dateToday' must be assigned before it
  can be used. Try giving it an initializer expression, or ensure that
  it's assigned on every execution path.</p>
  </blockquote>