title: Flutter TextField with controller resetting after TextInputType change
body: <p>I'm using a fullscreen dialog in my app to make the user input values into text fields. Some of these values are Strings and some are ints. So I want to change the keyboard accordingly to make the unnecessary keys disappear. Here's my implementation:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:meal_tracker/model/food_model.dart';
  
  class AddFoodDialog extends StatelessWidget {
    TextEditingController nameController = TextEditingController(),
        carbsController = TextEditingController(),
        fatController = TextEditingController(),
        proteinController = TextEditingController(),
        amountController = TextEditingController();
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text("Add Food"),
          actions: &lt;Widget&gt;[
            FlatButton(
              child: Text(
                "SAVE",
                style: TextStyle(color: Colors.white),
              ),
              onPressed: () {
                _handleSave(context);
              },
            )
          ],
        ),
        body: Form(
            child: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Column(
            children: &lt;Widget&gt;[
              TextFormField(
                decoration: InputDecoration(labelText: "Name"),
                controller: nameController,
              ),
              TextFormField(
                decoration: InputDecoration(labelText: "Carbs per 100g"),
                controller: carbsController,
                keyboardType: TextInputType.number,
              ),
              TextFormField(
                decoration: InputDecoration(labelText: "Fat per 100g"),
                controller: fatController,
                keyboardType: TextInputType.number,
              ),
              TextFormField(
                decoration: InputDecoration(labelText: "Protein per 100g"),
                controller: proteinController,
                keyboardType: TextInputType.number,
              ),
              TextFormField(
                decoration: InputDecoration(labelText: "Amount in g"),
                controller: amountController,
                keyboardType: TextInputType.number,
              ),
            ],
          ),
        )),
      );
    }
  
    void _handleSave(BuildContext context) {
      print("Dialog text: " + nameController.text);
      Navigator.of(context).pop(Food(
          name: nameController.text,
          carbsPer100g: double.parse(carbsController.text),
          fatPer100g: double.parse(fatController.text),
          proteinPer100g: double.parse(proteinController.text),
          amount: double.parse(amountController.text)));
    }
  }
  </code></pre>
  
  <p>The problem is that when I input something in the "Name" TextField, which has <code>TextInputType.text</code> and then tap into another one of the TextFields, which has <code>TextInputType.number</code>, the "Name" field clears out for no apparent reason. That also happens the other way around.</p>