snap property

bool snap

Whether the widget should snap between snapSizes when the user lifts their finger during a drag.

If the user's finger was still moving when they lifted it, the widget will snap to the next snap size (see snapSizes) in the direction of the drag. If their finger was still, the widget will snap to the nearest snap size.

Snapping is not applied when the sheet is programmatically moved by calling DraggableScrollableController.animateTo or DraggableScrollableController.jumpTo.

Rebuilding the sheet with snap newly enabled will immediately trigger a snap unless the sheet has not yet been dragged away from initialChildSize since first being built or since the last call to DraggableScrollableActuator.reset.


final bool snap;