snapSizes property

List<double>? snapSizes

A list of target sizes that the widget should snap to.

Snap sizes are fractional values of the parent container's height. They must be listed in increasing order and be between minChildSize and maxChildSize.

The minChildSize and maxChildSize are implicitly included in snap sizes and do not need to be specified here. For example, snapSizes = [.5] will result in a sheet that snaps between minChildSize, .5, and maxChildSize.

Any modifications to the snapSizes list will not take effect until the build function containing this widget is run again.

Rebuilding with a modified or new list will 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 List<double>? snapSizes;