title: How to automatically set value for a text field based on value from another text field in Flutter?
body: <pre><code>Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: &lt;Widget&gt;[
              Text("Postal Code"),
          TextField(
            controller: controllerPostalCode,
          ),
  
          // if controllerPostalCode not null
          Container(
              child: FutureBuilder&lt;AddressCtrl&gt;(   //Future Builder that hold data on State and Country
                  future: getDataCtrl(),
                  builder: (context, snapshot) {
                    if (snapshot.hasData) {
                      if (snapshot.data.result == null) {
                        return Container();
                      } else {
                        return Container(
                          child: Column(
                            children: &lt;Widget&gt;[
                              Text("State"),
                              TextField(
                                decoration: InputDecoration(
                                    hintText: snapshot.data.result[index].State // value will be display after user input Postal Code text field
                                    ),
                              ),
                              Text("Country"),
                              TextField(
                                decoration: InputDecoration(
                                    hintText: snapshot.data.result[index].Country // value will be display after user input Postal Code text field
                                    ),
                              )
                            ],
                          ),
                        );
                      }
                    }
                  })),
        ],
      ),
    ),
  </code></pre>
  
  <p>I want to automatically input values to two text field (in this case: State and Country) based on value of user input on Postal Code text field without having to click on any button. I found many question regarding this issue but I couldn't find in Dart/Flutter.</p>
  
  <p>Additional notes: The value of State and Country are from REST API.</p>