title: type 'List<Widget?>' is not a subtype of type 'List<Widget>' in type cast
body: <p>After running <strong>dart migrate</strong> &amp; applying null safety, that error popped up at my code and I think that's the error causing code block.</p>
  <pre><code>LayoutBuilder(builder: (context, cons) {
    return GestureDetector(
      child: new Stack(
        children: &lt;Widget?&gt;[
          // list of different widgets 
          .
          .
          .
        ].where((child) =&gt; child != null).toList(growable: true) as List&lt;Widget&gt;,
      ),
    );
  ),
  </code></pre>
  <p>The error message says:</p>
  <pre><code>The following _CastError was thrown building LayoutBuilder:
  type 'List&lt;Widget?&gt;' is not a subtype of type 'List&lt;Widget&gt;' in type cast
  
  The relevant error-causing widget was
  LayoutBuilder
  package:projectName/…/components/fileName.dart:182
  </code></pre>
  <p>If anyone encountered this issue, how it can be solved?</p>