title: Dart make sure optional boolean in class is not null
body: <p>Since it's an optional value, it will sometimes be null, so how can I avoid it throwing an error? Is this the only way to do it?</p>
  
  <pre><code>class QText extends StatelessWidget {
    QText(this.text, this.size, [this.bold]);
  
    final String text;
    final double size;
    bool bold;
  
    @override
    Widget build(BuildContext context) {
      bold = (bold == null) ? false : bold;
      return Whatever..
    }
  }
  </code></pre>
  
  <p>I'd like to do this but of course it doesn't work:</p>
  
  <pre><code>class QText extends StatelessWidget {
    QText(this.text, this.size, [this.bold]);
  
    final String text;
    final double size;
    final bool bold ?? false;
  
    @override
    Widget build(BuildContext context) {
      return Whatever..
    }
  }
  </code></pre>