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),
)
],
);
},
),
);
}