Flutter `TextFormField` with RichText or `SpanText` in `initialValue`

1.7k views Asked by At

I have some TextFormFields that I would like to have populated with RichText or SpanText instead of String in initialValue.

Is there a packaged that can help me with this?

The reason is that I am "highligting" phone numbers, emails and links by using this neat trick described here: https://stackoverflow.com/a/58361777/4475206 and it works like a charm when using it in a 'ordinary' Text.rich widget, but not so when using TextFormField when we need to set the initialValue parameter which just accepts String.

1

There are 1 answers

2
Ali Bakhtiyari On

Checkout one of the following packages:

  1. flutter_quill (Popular)
  2. rich_input