last character disappears in

I am implementing the following method to save data of text field in case of change to _detailsDictionary ,but when it saves ,the last letter enterd in textfield.text doesn't appear,e.g if I am saving "Krish",then only kris will be saved.How thids can be fixxed?