:::

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. 訊息


:::

書籍目錄

展開 | 闔起

快速登入


http%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1901%26tbsn%3D42

計數器

今天: 1837183718371837
昨天: 2602260226022602
總計: 8096165809616580961658096165809616580961658096165