水平列表
主要用于Web或桌面应用程序中的水平列表组件。
使用该库
将仓库添加到你的Flutter pubspec.yaml 文件中。
dependencies:
horizontal_list: <<version>>
然后运行…
flutter packages get
示例
HorizontalListView(
list: [Text('Text 1'), Text('Text 2')], //List of widget
iconNext: Icon(Icons.arrow_forward_ios), // Icon for button next
iconPrevious: Icon(Icons.arrow_back_ios), // Icon for button previous
curveAnimation: Curves.bounceIn, //Curve for animation
durationAnimation: Duration(milliseconds: 300), //Duration of animation
onNextPressed: () { //On button next pressed
print('On next pressed');
},
onPreviousPressed: () { //On button next pressed
print('On previous pressed');
},
),