I have a ClipRRect that is rounded at the bottom and it contains text in it. The problem I am facing now is that I can not add some padding at the bottom of the ClipRRect and my text in the widget gets cut out and when I wrap the ClipRRect with padding widget or add a sized box after the text I get overflow error.
ClipRRect(
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(30),
bottomRight: Radius.circular(30),
),
child: Container(
color: Colors.grey,
child: Text(
description,
style: const TextStyle(fontSize: 15),
),
),
);
I am expecting my text not to be cut out at the bottom.
2
Answers
Add padding to the text.
You can use padding from Container.
Actually you can minimize the snippet like