v2.0.0scaled_list
一個水平列表視圖,包含大量修改,包括縮放的當前項目和彎曲的自定義繪製。
140喜歡 110近 30 天下載150Pub 分數
AndroidiOSWebmacOSWindowsLinux
一個水平列表視圖,包含大量修改,包括縮放的當前項目、曲線自定義繪製和下方的圓點指示器。
{"sdk":"flutter"}{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
Effective Dart Badge MIT License Badge
A Horizontal List view With Lots of modification including a scaled current item.
Image Image Image
@override
Widget build(BuildContext context) {
return Scaffold(
body: ScaledList(
itemCount: Data.categories.length,
itemColor: (index) {
return kMixedColors[index % kMixedColors.length];
},
itemBuilder: (index, selectedIndex) {
final category = Data.categories[index];
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: selectedIndex == index
? 100
: 80,
child: Image.asset(category.image),
),
SizedBox(height: 15),
Text(
category.name,
style: TextStyle(
color: Colors.white,
fontSize: selectedIndex == index
? 25
: 20),
)
],
);
},
),
);
}