📅  最后修改于: 2022-03-11 14:55:15.443000             🧑  作者: Mango
Padding(
padding: const EdgeInsets.all(8.0),
child: ListView.builder(
itemCount: the_length_of_your_items,
itemBuilder: (BuildContext context,int index) {
return Slidable(
actionPane: SlidableDrawerActionPane(),
actionExtentRatio: 0.25,
child: Container(
color: Colors.white,
child: ListTile(
leading: Text(('the_leading')),
title: Text(('the_title')),
trailing: Text(('the_trailing')),
subtitle: Text(('the_subtitle')),
),
),
actions: [
IconSlideAction(
caption: 'Archive',
color: Colors.blue,
icon: Icons.archive,
onTap: () {print('archive');},
),
IconSlideAction(
caption: 'Share',
color: Colors.indigo,
icon: Icons.share,
onTap: () {print('share');},
),
],
secondaryActions: [
IconSlideAction(
caption: 'More',
color: Colors.black45,
icon: Icons.more_horiz,
onTap: () {print('more');},
),
IconSlideAction(
caption: 'Delete',
color: Colors.red,
icon: Icons.delete,
onTap: () {print('delete');},
),
],
);
}),
),