Flutter: Minimum height on horizontal list view

后端 未结 7 1113
鱼传尺愫
鱼传尺愫 2020-12-02 08:54

I\'m trying to create a horizontal scrolling list of items in Flutter, and I want that list to only take up the necessary height based on its children. By design “List

7条回答
  •  醉话见心
    2020-12-02 09:10

    I'm using a horizontal listview builder of container so to stop the Container for taking the full height i just wrapped it with Center and it worked perfectly.

    itemBuilder: (context, i){
                  return Center(child: word_on_line(titles[i]));
              }
    

提交回复
热议问题