【发布时间】:2019-04-11 14:12:51
【问题描述】:
所以我看到了ReorderableListView demo 并看到他们有
“次要:const Icon(Icons.drag_handle)”
但是查看reorderable_list.dart 文件,我注意到整个列表无论如何都可以在 LongPressDraggable 上拖动 [第 424 行]。那么我如何显式地对源代码或我自己的代码进行更改,以便正确地使图标成为实际的拖动手柄?
CheckboxListTile(
key: Key(item.value),
isThreeLine: true,
value: item.checkState ?? false,
onChanged: (bool newValue) {
setState(() {
item.checkState = newValue;
});
},
title: Text('This item represents ${item.value}.'),
subtitle: secondary,
secondary: const Icon(Icons.drag_handle), // Make this Icon drag source
);
谢谢
【问题讨论】: