title: How to add an Icon at the beginning of PopupMenuItem in flutter app
body: <p>I have a <code>PopupMenuButton</code> widget in which I want to add an icon at the beginning of each <code>PopupMenuItem</code>. I've been trying to find a way to do this but I'm not finding any.</p>
  
  <pre class="lang-dart prettyprint-override"><code>Below is the **main.dart** file.
  import 'package:flutter/material.dart';
  import 'package:practical_0/homepage.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
            primarySwatch: Colors.blue
        ),
        home: Homepage(),
      );
    }
  }
  </code></pre>
  
  <p>Below is the <strong>home.dart</strong> file. This is where I have implemented the PopupMenuButton. I want the icon to appear at the beginning of <code>PopupMenuItem</code> before the <code>text</code>.</p>
  
  <pre class="lang-dart prettyprint-override"><code>import 'package:flutter/material.dart';
  
  enum WhyFarther { harder, smarter, selfStarter, tradingCharter }
  
  class Homepage extends StatelessWidget {
  
    final double heightFactor = 600/896;
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: Container(
          return new Card(
            new Row(
              children: &lt;Widget&gt;[
                PopupMenuButton&lt;WhyFarther&gt;(
                 onSelected: (WhyFarther result) { setState(() { _selection = result; }); },
                 itemBuilder: (BuildContext context) =&gt; &lt;PopupMenuEntry&lt;WhyFarther&gt;&gt;[
                  const PopupMenuItem&lt;WhyFarther&gt;(
                    value: WhyFarther.harder,
                    child: Text('Working a lot harder'),
                  ),
                  const PopupMenuItem&lt;WhyFarther&gt;(
                    value: WhyFarther.smarter,
                    child: Text('Being a lot smarter'),
                  ),
                  const PopupMenuItem&lt;WhyFarther&gt;(
                    value: WhyFarther.selfStarter,
                    child: Text('Being a self-starter'),
                   ),
                   const PopupMenuItem&lt;WhyFarther&gt;(
                     value: WhyFarther.tradingCharter,
                     child: Text('Placed in charge of trading charter'),
                   ),
                  ],
                ),
              ],
            )
          ),
        ),
      );
    }
  }
  
  </code></pre>