I want to change value input without typing. Example, I have two Text-Form-Field then I want when I type 1 in Text-Form-Field #1 so the value display in Text-Form-Field #2 is 2. I want to value change depend on value in other input then display it.
I am trying but not work. So how to solve this problem. Please help me !!!!!!!!!
3
Answers
You can update value of text field 2 in onChanged method of text field 1.
Example:-
For this task, using the
TextEditingController
along with theonChanged
callback function of the TextFormField is recommended. The following example provides a clear illustration of the desired approach.You can simply implement this with assigning same textEditingController to the both textFormField widget as below