title: why Doesn't see List type?
body: <p>I am using declare an array -</p>
  <pre><code>  final List&lt;DropdownMenuItem&lt;String&gt;&gt; listDropDown;
  </code></pre>
  <p>And I use the following construction -</p>
  <pre><code>class DropDown extends StatelessWidget {
  
    final String dropDownValue;
    final List&lt;DropdownMenuItem&lt;String&gt;&gt; listDropDown;
  
    DropDown(this.dropDownValue, this.listDropDown);
  </code></pre>
  <p>But I get an error -</p>
  <pre><code>The argument type 'List&lt;dynamic&gt;' can't be assigned to the parameter type 'List&lt;DropdownMenuItem&lt;String&gt;&gt;?'.
  </code></pre>
  <p>In this place -</p>
  <pre><code>return DropdownMenuItem(
                        value: dropDownValue,
                        child: Text(items, style: TextStyle(fontFamily: &quot;Mark-Pro&quot;, fontSize: 18, fontWeight: FontWeight.w500, color: configColors.darkBlue),),
                      );
                    }).toList(),
  </code></pre>
  <p>full dropDownButtom -</p>
  <pre><code>child: DropdownButton(
                    items: listDropDown.map((String items) {
                      return DropdownMenuItem(
                        value: dropDownValue,
                        child: Text(items, style: TextStyle(fontFamily: &quot;Mark-Pro&quot;, fontSize: 18, fontWeight: FontWeight.w500, color: configColors.darkBlue),),
                      );
                    }).toList(),
                    // Initial Value
                    value: dropDownValue,
  
                    // Down Arrow Icon
                    icon: const Icon(Icons.keyboard_arrow_down),
  
                    // Array list of items
  
                    // After selecting the desired option,it will
                    // change button value to selected value
                    onChanged: (String? newValue) {
                      mystate(() {
                        dropDownValue = newValue!;
                      });
                    },
                  ),
  </code></pre>