title: Flutter conditional rendering with null-safety
body: <p>I want to render Text widget if <strong>expires</strong> not null. So I did the check for null</p>
  <p>But got the error</p>
  <p><a href="https://i.stack.imgur.com/fgVid.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fgVid.png" alt="enter image description here" /></a></p>
  <pre><code>class TileButton extends StatelessWidget {
    final DateTime? expires;
  
    const TileButton({
      Key? key,
      this.expires,
    }) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return Row(
        children: [
          Text(
            'Hello Flutter',
          ),
          if (expires != null)
            Text(
              expires.day.toString(),
            ),
        ],
      );
    }
  }
  </code></pre>