title: Flutter - Error: The argument type 'String/*1*/' can't be assigned to the parameter type 'String/*2*/'
body: <pre><code>String selectedValue;
  
  Widget _dropDownMenu&lt;String&gt;({String title, List&lt;String&gt; list, List&lt;String&gt; strList, Function(String) onChange}) {
  
      return Container(
        decoration: containerDecoration(border: Border.all(color: Colors.grey)),
        width: MediaQuery.of(context).size.width - 20,
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: &lt;Widget&gt;[
            SizedBox(width: 10),
            Container(
              width: MediaQuery.of(context).size.width - 60,
              child: DropdownButtonHideUnderline(
                child: DropdownButton&lt;String&gt;(
                  value: selectedValue,
                  hint: Text(title),
                  items: List.generate(list.length, (index) {
                    return DropdownMenuItem&lt;String&gt;(
                      value: list[index],
                      child: Text(strList[index], key: UniqueKey()),
                    );
                  }),
                  onChanged: (value) {
                    setState(() {
                      selectedValue = value;
                      onChange(value);
                    });
                  }
                )
              ),
            ),
            SizedBox(width: 10)
          ] 
        )
      );
    }
  </code></pre>
  
  <p>this code give me this message </p>
  
  <blockquote>
    <p>lib/src/ui/Filter_page.dart:136:24: Error: The argument type
    'String/<em>1</em>/' can't be assigned to the parameter type 'String/<em>2</em>/'.
     - 'String/<em>1</em>/' is from 'dart:core'.
     - 'String/<em>2</em>/' is from 'package:fundaqah_flutter/src/ui/Filter_page.dart'
    ('lib/src/ui/Filter_page.dart'). Try changing the type of the
    parameter, or casting the argument to 'String/<em>2</em>/'.
                    value: selectedValue,</p>
  </blockquote>
  
  <p>and <code>.toString()</code> not working </p>