title: Is it possible to show/hide textformfields in Flutter based on a Checkbox
body: <p>I am trying to use a checkbox to show/hide 2 textformfields in Flutter. I have tried the below code thinking that it would use the state of the checkbox to display the fields. but this does not work. </p>
  
  <p>The Checkbox itself does toggle between true and false but there is no change in the layout.</p>
  
  <pre><code>CheckboxListTile(
                                title: Text("Do you want to update your price?"),
  
                        controlAffinity: ListTileControlAffinity.leading,
                            value: priceupdate_value,
                            onChanged: (bool priceupdateValue) {
                              setState(() {
  
  
                                priceupdate_value = priceupdateValue;
  
                              });
                              if(priceupdate_value == true){
  
                                Column(
                                  children: &lt;Widget&gt;[
                                    TextFormField(
                                      decoration: InputDecoration(
                                        labelText: 'New Price',
                                      ),
  
                                    ),
                                    TextFormField(
                                      decoration: InputDecoration(
                                        labelText: 'Update Other Information',
                                      ),
  
                                    ),
  
                                  ],
                                );
  
                              }
  
                            },
  
                      ),
  </code></pre>