How to format text as we type in TextField widget of flutter?

Posted by Jessica Taylor | Updated on

How to format text as we type in TextField widget of flutter?

I’ve found that the solution is easy.

I just had to extend/implement TextEditingController and create my implementation of TextSpan buildTextSpan({TextStyle style , bool withComposing}).

This buildTextSpan method is responsible for creating text spans shown in TextField.


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