:::

6-12 橫向無限選軸

Container(
  height: 200.0,
  padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 10.0),
  child: ListView.separated(
      padding: EdgeInsets.only(right: 8.0),
      scrollDirection: Axis.horizontal,
      itemBuilder: (context, index) {
        FoodCate foodCate = snap.data[index];
        return FoodKindButton(img: foodCate.img, title: foodCate.cate);
      },
      separatorBuilder: (context, index) {
        return Container(
          color: Colors.transparent,
          width: 1.0,
        );
      },
      itemCount: snap.data.length),
);

要綁定高度,避免出現 Horizontal viewport was given unbounded height. 訊息


:::

書籍目錄

展開 | 闔起

https%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D42%26tbdsn%3D1901

計數器

今天: 2096209620962096
昨天: 4038403840384038
總計: 5566059556605955660595566059556605955660595566059