I want to store the value from textfield in flutter without pressing any button(Like note app in ios)Can anyone helpe me?Thank you
How to get values from tetfield without pressing any button in flutter..
i already used onchange(){} function..but it store every text one by one that user have entered i want to store only the the latest text user entered..
3
Answers
to get last character from this add String extension after class close ,
and your _printLatestValue is like,
onChanged will be called every time the TextField changes.
You can also use TextEditingController to listen the TextField changes.
You can make use of the onChanged property of the TextField. The onChanged property is a callback that is invoked every time the text in the TextField changes.Then save the text value using local Db or SharedPreference