Text( product.description, style: TextStyle(color: Colors.black, height: 4)),
Update to comment: "thanks for your concern, the height property is good, but it did it equally for all line, what else I have to do to look like the picture, which I have shared in question"
This will do the job!
RichText(
text: TextSpan(
children: splitText(text),
),
)
List<TextSpan> splitText(String text) {
List<TextSpan> reasonList = [];
text.split(".").forEach((element) {
reasonList.add(TextSpan(
text: "$element\n\n\n", style: TextStyle(color: Colors.black)));
});
return reasonList;
}
So what are we doing exactly?
First we're turning your text into a list of sentences, with text.split(".") which splits the text whenever it encounters a '.'
Now we are adding it in a list of TextSpan to be able to use it in RichText.
Here's the part where it makes space between every sentence "$element\n\n\n" I don't know if you know but \n means insert a new line. As if you hit the enter button. I used 3 \n's so that it will leave 2 lines empty after every sentence.
wordSpacingstyle?