title: Flutter text field value from state + on change update state
body: <p>I have a text field value powered by a State variable with some calculation, I want to live calculate and update the same state variable back when user inputs value. The final result just doesnt work, text fiend input behaves strangely. </p>
  
  <p>If I use onSubmitted instead of onChanged, it works well, I guess I am not in a loop of updating values back and forth from the state variable. </p>
  
  <p>Any idea how can I make this happen?</p>
  
  <pre><code>myController.text = '${value.toStringAsFixed(1)}';
  
  TextField(
    onChanged: (text){
      this.onValueChange(text, index);
    },
    controller: myController,
  ),
  </code></pre>
  
  <p>and the function onValueChange is calling to set state is this</p>
  
  <pre><code>  void setValue(_value, _index){
      setState((){
        value =double.parse(_value)/exchangeRate["rates"][currencies[_index]];
      });
    }
  </code></pre>