Flutter: Store and retrieve formatted text in firestore/realtime database

Viewed 469

I am currently using flutter_quill pakage for formatting text. Now I want to store it in firestore /realtime database. I want to retrieve the formatted text as it is and show in my app.

After researching I came across flutter_html which will help me to display html code in my flutter app. This is great but now I also have to store html data to database.

So, how can I store html data to database using flutter_quill or zefyrka or is there any text editor package which will help me to do my objective.

Any new suggestions are also welcomed. I just want to store and retrieve formatted text in firestore/realtime database using flutter.

1 Answers

Perhaps you should try to encode your text in base64 and store the encoded text in cloud firestore. Please decode your encoded text before displaying it in your app.

Related