is it possible to wrap text inside a circle in Flutter? Here is a failed example. Ideally the text would fit inside the circle and overflow at the end only.
ClipOval(
child: SizedBox.expand(
child: Text(
"Round and round the rugged rocks, the rascally rascals ran. Round and round the rugged rocks, the rascally rascals ran. Round and round the rugged rocks, the rascally rascals ran. Round and round the rugged rocks, the rascally rascals ran. ",
softWrap: true,
overflow: TextOverflow.fade,
),
),
),
As of now (July 2019), Flutter does not directly support laying out text in non-rectangular shapes.
Using existing API, it should be possible to achieve a similar custom effect by implementing something that performs the following steps:
That should be able to get you something close. The implementation will have to handle all of the calculations of the widths of the circle at each y-position as well as manually position each line of text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With