title: how to provide initialValue in TextFormField from Cloud FireStore
body: <p>I am trying to update my data in cloud Firestore through a form. I need the already stored fields in the firestore to be shown as initialValue in the TextFormField.</p>
  
  <p>The fetched data is printed on the console by print() but it shows nothing in the TextFormField. </p>
  
  <p>The initialValue has the same line of code I used for print(). </p>
  
  <p>The data is also fetched properly. </p>
  
  <p>This is the code :</p>
  
  <pre><code>var initData = {
  'title': '',
   };
  
  void didChangeDependencies() async{
  super.didChangeDependencies();
  await Firestore.instance
      .collection('${widget.collection}')
      .document('${widget.title}')
      .get()
      .then((value) {
    setState(() {
      initData = {
        'title': value.data['title'],
      };
    });
  });
  
  if (isValid) {
    _formKey.currentState
        .save();
    }
    widget.submitFn(
      _title,)
   }
  
  @override
  Widget build(BuildContext context) {
  
  print(initData['title']); // the fetched data is printed in the console
  
  return Form(
    key: _formKey,
   Column(
     children: &lt;Widget&gt;[
                 TextFormField(
                    initialValue: initData['title'], // this doesnt show anything on the TextFormField,
                    decoration: InputDecoration(
                        labelText: 'Enter Product Name',
                        contentPadding: EdgeInsets.all(5)),
                    validator: (value) {
                      if (value.isEmpty) {
                        return 'Enter a the Product Title';
                      }
                      return null;
                    },
                    onSaved: (value) {
                      _title = value;
                    },
                  ),
                ),
              ),
             }
  </code></pre>