I have a ListView.separated with ListTiles which contains a shape: RoundedRectangleBorder.
Everything is displayed as I want. But when I scroll the ListView, the content within the ListTile is hidden but not the shape.
The ListView is in the Expanded as follow:
SafeArea
— Padding
—- Column
—— Center
—— Expanded
Any help will be appreciated
2
Answers
Try wrapping the
ListView
in aMaterial
. The shape is drawn on the underlying material. By giving it its own material it shouldn’t be able to draw outside its boundsyou can delete Expanded and add the listview in container and set height to container