skip to Main Content

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


  1. Try wrapping the ListView in a Material. The shape is drawn on the underlying material. By giving it its own material it shouldn’t be able to draw outside its bounds

    Login or Signup to reply.
  2. you can delete Expanded and add the listview in container and set height to container

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search