I have use an API for Gemini AI, this AI sends me a text with stars and tags for format the text like this:
**Knowledge and Information:**
**Answer questions:** Provide factual information and knowledge on a wide range of topics.
**Summarize text:** Extract and condense key points from written content.
**Translate languages:** Convert text between different languages.
**Generate text:** Create original text, such as stories, articles, and poems.
**Calculate and convert:** Perform mathematical operations and convert units.
I want to format this text in flutter so the title be large as the AI sends, How can I do it?
I tried Gemini AI model so I want help for reformat the text that it sends in Flutter.
2
Answers
If your responses are covered with tags and in HTML form, you should use flutter_html.
This package is easy and ready to use.
You can do it manually, we check if our text has doubls stars, if it has, we bold it otherwise we show it like normal texts.
Use below code to bold texts that are covered with 2 stars in beginning and end like ****
Happy Coding 🙂