How to use NumberFormat in TextInputFormatter in Flutter?

Posted by Jennifer | Updated on

Want to use NumberFormat in TextInputFormatter in Flutter? This is because after you format the value you are adding a new char but the the text selection remains at the same position, one char less, this cause an expected behavior

You can modified your TextInputFormatter like this:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers