title: How to add Flutter DropdownButtonFormField
body: <p>Beginner Flutter enthusiast here, just learning the widget system.
  Wanted to implement autocomplete textfield using out of the box widgets (not plugins ok)
  The DropdownButtonFormField is perfect for my use case but when I try using it, the compiler gives me a Method not found error.</p>
  
  <pre><code>Compiler message:
  lib/expanding_text.dart:100:11: Error: Method not found: 'DropdownButtonFormField'.
            DropdownButtonFormField(),
            ^^^^^^^^^^^^^^^^^^^^^^^
  lib/expanding_text.dart:100:11: Error: The method 'DropdownButtonFormField' isn't defined for the class '#lib1::_TripItemState'.
  Try correcting the name to the name of an existing method, or defining a method named 'DropdownButtonFormField'.
            DropdownButtonFormField(),
  </code></pre>
  
  <p>Heres my code (the relevant part)</p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  ...
  
  
  @override
    Widget build(BuildContext context) {
        return Column(
          children: &lt;Widget&gt;[
            DropdownButtonFormField&lt;String&gt;(
               items: [DropdownMenuItem&lt;String&gt;(child:Text("test"))],
            ),
  
  </code></pre>
  
  <p>Looking at the docs it seems like I can freely add it to the widget tree without extra configuration.  But obviously I'm missing something here because of the error.</p>
  
  <p>So to troubleshoot whats happening, is DropdownButtonFormField still in the material library?</p>
  
  <p>Is there anything else Im missing?</p>