I want to make the word Capital UNDERLINE here. How can we do that in String.
QuestionCategory(question: 'What is the Capital of India?', correctAnswer: 'Delhi'),
I want to make the word Capital UNDERLINE here. How can we do that in String.
QuestionCategory(question: 'What is the Capital of India?', correctAnswer: 'Delhi'),
2
Answers
I think you can do it in two ways. First, you can use underline text generator websites to generate the underlined version of the word ‘Capital’ and paste it into your string.
Second, you can use RichText. Split the string into multiple Text widgets and give the ‘Capital’ text a style with TextDecoration.underline.
You can use
Text.rich
orRichText
for this:Text.rich:
RichText: