title: Assertion error when selecting item in DropdownButton
body: <p>I have created an app in Flutter to use for my company's inventory. One of the widgets in the app is a DropdownButton that is populated with elements from Firebase Cloud Firestore. All the menu items are loading properly, but when I select an item I get a red screen.</p>
  
  <p>I am fairly new to Flutter so I mostly copied the code from a tutorial, so I find it odd that it does not work.</p>
  
  <pre><code>class _ReviewChangesScreenState extends State&lt;ReviewChangesScreen&gt; {
    final GlobalKey&lt;ScaffoldState&gt; _scaffoldKey = GlobalKey&lt;ScaffoldState&gt;();
    final GlobalKey&lt;FormState&gt; _formKey = GlobalKey&lt;FormState&gt;();
    DocumentSnapshot job;
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
          key: _scaffoldKey,
          appBar: AppBar(
            title: Text('Review Changes'),
          ),
          body: Column(children: &lt;Widget&gt;[
            Padding(
              padding: const EdgeInsets.all(8.0),
              child: Form(
                  key: _formKey,
                  child: StreamBuilder(
                    stream: Firestore.instance.collection('jobs').snapshots(),
                    builder: (BuildContext context,
                        AsyncSnapshot&lt;QuerySnapshot&gt; snapshot) {
                      if (!snapshot.hasData) return new Text('Loading...');
                      return new DropdownButton(
                        value: job,
                        onChanged: (val) {
                          setState(() {
                            job = val;
                          });
                        },
                        items: snapshot.data.documents
                            .map&lt;DropdownMenuItem&lt;DocumentSnapshot&gt;&gt;(
                                (DocumentSnapshot document) {
                          return new DropdownMenuItem&lt;DocumentSnapshot&gt;(
                            child: Text(document.data['jobCode']),
                            value: document,
                          );
                        }).toList(),
                      );
                    },
                  )),
            ),
          ]));
    }
  }
  </code></pre>
  
  <p>This is the error I receive when I try to select an item in the menu.</p>
  
  <pre><code>I/flutter ( 7320): The following assertion was thrown building StreamBuilder&lt;QuerySnapshot&gt;(dirty, state:
  I/flutter ( 7320): _StreamBuilderBaseState&lt;QuerySnapshot, AsyncSnapshot&lt;QuerySnapshot&gt;&gt;#22b54):
  I/flutter ( 7320): 'package:flutter/src/material/dropdown.dart': Failed assertion: line 609 pos 15: 'items == null ||
  I/flutter ( 7320): items.isEmpty || value == null || items.where((DropdownMenuItem&lt;T&gt; item) =&gt; item.value ==
  I/flutter ( 7320): value).length == 1': is not true.
  
  </code></pre>
  
  <p>Flutter doctor output:</p>
  
  <pre><code>Doctor summary (to see all details, run flutter doctor -v):
  [√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17763.529],
      locale en-CA)
  [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
  [√] Android Studio (version 3.3)
  [√] Connected device (1 available)
  
  </code></pre>
  
  <p>I'm really stumped on what the issue is.</p>