title: TextField focus stuck when dropdown button is selected
body: <p>I have a text field and a drop-down menu, both controlled by a Bloc. The problem I have is that as soon as the text field gets selected, it won't give up the focus if the user then tries to select something from the dropdown menu. The menu appears and then disappears an instant later and the focus is still on the text field. </p>
  
  <p>Here is a basic app that demonstrates the problem:</p>
  
  <pre><code>import 'dart:async';
  import 'package:flutter/material.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Textfield Focus Example',
        home: HomePage(),
      );
    }
  }
  
  class HomePage extends StatelessWidget {
  
    FormBloc formBloc = FormBloc();
  
    final List&lt;DropdownMenuItem&gt; userMenuItems = ['Bob', 'Frank']
        .map((String name) =&gt; DropdownMenuItem(
              value: name,
              child: Text(name),
            ))
        .toList();
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: &lt;Widget&gt;[
              // user - drop down menu
              Row(
                mainAxisSize: MainAxisSize.min,
                mainAxisAlignment: MainAxisAlignment.center,
                children: &lt;Widget&gt;[
                  Text('To: '),
                  StreamBuilder&lt;String&gt;(
                      stream: formBloc.selectedUser,
                      builder: (context, snapshot) {
                        return DropdownButton(
                            items: userMenuItems,
                            value: snapshot.data,
                            onChanged: formBloc.selectUser);
                      }),
                ],
              ),
  
              // amount - text field
              Row(
                mainAxisSize: MainAxisSize.min,
                mainAxisAlignment: MainAxisAlignment.center,
                children: &lt;Widget&gt;[
                  Text('Amount: '),
                  Container(
                      width: 100.0,
                      child: StreamBuilder&lt;double&gt;(
                          stream: formBloc.billAmount,
                          builder: (context, snapshot) {
                            return TextField(
                              keyboardType: TextInputType.number,
                              onChanged: formBloc.newBillAmount,
                            );
                          })),
                ],
              ),
            ],
          ),
        ),
      );
    }
  }
  
  class FormBloc {
    StreamController&lt;String&gt; _selectedUserController = StreamController&lt;String&gt;();
    Stream&lt;String&gt; get selectedUser =&gt;
        _selectedUserController.stream;
    Function get selectUser =&gt; _selectedUserController.sink.add;
  
    //Amount
    StreamController&lt;double&gt; _billAmountController = StreamController&lt;double&gt;();
    Stream&lt;double&gt; get billAmount =&gt;
        _billAmountController.stream;
    void newBillAmount(String amt) =&gt;
        _billAmountController.sink.add(double.parse(amt));
  
  
    void dispose() {
      _selectedUserController.close();
      _billAmountController.close();
    }
  }
  </code></pre>
  
  <p>Do I manually need to declare the FocusNode for the textField and tell it when to give up focus? Or is there some other reason that the text field is hogging all the attention?</p>