title: Highlight selected value in DropdownButton (like PopupMenuButton)
body: <p>When a <code>PopupMenuButton</code> is pressed, the currently selected value is highlighted, <a href="https://i.stack.imgur.com/VDpNs.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VDpNs.png" alt="enter image description here"></a></p>
  
  <p>but when a <code>DropdownButton</code> is pressed, the currently selected value is not highlighted.  <a href="https://i.stack.imgur.com/A3Jiz.png" rel="noreferrer"><img src="https://i.stack.imgur.com/A3Jiz.png" alt="enter image description here"></a></p>
  
  <p>Is there a way to highlight the selected value of a <code>DropdownButton</code>?</p>
  
  <p>For reference here is some sample code:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(home: MyHomePage());
    }
  }
  
  class MyHomePage extends StatefulWidget {
    MyHomePage({Key key}) : super(key: key);
  
    @override
    _MyHomePageState createState() =&gt; _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
    String letter = 'A';
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(title: Text('Popup Menu Button')),
        body: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: &lt;Widget&gt;[
            SizedBox(height: 16.0),
            Text('PopupMenuButton'),
            buildPopupMenuButton(),
            SizedBox(height: 16.0),
            Text('DropdownButton'),
            buildDropdownButton(),
          ],
        ),
      );
    }
  
    Widget buildPopupMenuButton() {
      return PopupMenuButton&lt;String&gt;(
        padding: EdgeInsets.zero,
        initialValue: letter,
        onSelected: (val) =&gt; setState(() =&gt; letter = val),
        child: ListTile(
          title: Text('The letter $letter'),
        ),
        itemBuilder: (BuildContext context) {
          return &lt;PopupMenuItem&lt;String&gt;&gt;[
            PopupMenuItem&lt;String&gt;(
              value: 'A',
              child: Text('The letter A'),
            ),
            PopupMenuItem&lt;String&gt;(
              value: 'B',
              child: Text('The letter B'),
            ),
          ];
        },
      );
    }
  
    Widget buildDropdownButton() {
      return Padding(
        padding: const EdgeInsets.symmetric(horizontal: 16.0),
        child: DropdownButton&lt;String&gt;(
          value: letter,
          onChanged: (val) =&gt; setState(() =&gt; letter = val),
          items: [
            DropdownMenuItem&lt;String&gt;(
              value: 'A',
              child: Text('The letter A'),
            ),
            DropdownMenuItem&lt;String&gt;(
              value: 'B',
              child: Text('The letter B'),
            ),
          ],
        ),
      );
    }
  }
  </code></pre>
  
  <p>Here's a video that shows the issue:</p>
  
  <p><a href="https://i.stack.imgur.com/jtKX9.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/jtKX9.gif" alt="enter image description here"></a></p>