ReorderDragBoundaryProvider typedef
Used to provide drag boundaries during drag-and-drop reordering.
link
DragBoundary(
child: CustomScrollView(
slivers: <Widget>[
SliverReorderableList(
itemBuilder: (BuildContext context, int index) {
return ReorderableDragStartListener(
key: ValueKey<int>(index),
index: index,
child: Text('$index'),
);
},
dragBoundaryProvider: (BuildContext context) {
return DragBoundary.forRectOf(context);
},
itemCount: 5,
onReorder: (int fromIndex, int toIndex) {},
),
],
)
)
See also:
- DragBoundary, a widget that provides drag boundaries.
Implementation
typedef ReorderDragBoundaryProvider = DragBoundaryDelegate<Rect>? Function(BuildContext context);