title: Drop down problem after onChanged in Flutter/dart
body: <p>I am working on drop down. In menu item I have row in which  I display icon on left side and  on right side I show text.</p>
  
  <p><strong>Problem:</strong></p>
  
  <p>When I select item from drop down it show icon and text both but I need to show the text only.In debug I print out value it display only text which is correct.</p>
  
  <p>Note: If I remove icon from row then it working fine.</p>
  
  <p>Debug Console </p>
  
  <p><a href="https://i.stack.imgur.com/71aUU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/71aUU.png" alt=""></a></p>
  
  <p>Menu Items</p>
  
  <p><a href="https://i.stack.imgur.com/jrjak.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jrjak.jpg" alt=""></a></p>
  
  <p>After select item both Icon and Text are display but I want to show text only</p>
  
  <p><a href="https://i.stack.imgur.com/WOyWW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WOyWW.jpg" alt=""></a></p>
  
  <p>Below is Code:</p>
  
  <pre><code>class _MyHomePageState extends State&lt;MyHomePage&gt;  {
    String _mySelection;
    List&lt;Map&gt; _myJson = [
  
    {"id":1,"name":"All List"},  
    {"id":2,"name":"Default"},
    {"id":3,"name":"Personal"},
    {"id":4,"name":"Shopping"},
    {"id":5,"name":"Wishlist"},
    {"id":6,"name":"Work"},
    {"id":7,"name":"Finished"}];
    @override
    void initState(){
      super.initState();
    }
  Icon actionIcon =  Icon(Icons.search);
   Widget appBarTitle =  Text("AppBar Title");
    @override
    Widget build(BuildContext context) { 
      return Scaffold(
  
        appBar: AppBar( 
  
          title: Theme(
                data: Theme.of(context).copyWith(
                  canvasColor: Theme.of(context).primaryColor
                ),
                child: DropdownButton(
                items: _myJson.map((item) {
                  return  DropdownMenuItem(
  
                    child: Row(
                      children: &lt;Widget&gt;[
                          Padding(
                            padding: EdgeInsets.symmetric(horizontal: 10.0),
                            child: Icon(Icons.menu,size: 13),
                          ),
                        Text(
                          item['name'],
                          style: TextStyle(color: Colors.white, fontSize: 17,)
                        ),
                      ],
                    ),
                    value: item['name']
                  );
                }).toList(),
  
                onChanged: (newvalue) {  
                  setState(() {
                    _mySelection = newvalue;
                    print(_mySelection); 
                  }); 
                },
  
                hint:  Text(_myJson[0]["name"],style: TextStyle(color: Colors.white,fontSize: 17)),
  
                value:_mySelection,
                ), // Your Dropdown Code Here,
              ),
  
             actions: &lt;Widget&gt;[
  
               IconButton(
                icon: Icon(Icons.search, color: Colors.white),onPressed:null,
  
          ),]
  
  
        ),
        body: null,
  
  
      );
    }//end of Widget build 
  
  
  }//end of _MyHomePageState
  </code></pre>