end method
Implementation
SheetHandleDragAction end({
required bool expanded,
required double velocity,
}) {
if (expanded) {
if (offset > collapseDistance || velocity > flingVelocity) {
return SheetHandleDragAction.collapse;
}
return SheetHandleDragAction.none;
}
if (offset < -expandDistance || velocity < -flingVelocity) {
return SheetHandleDragAction.expand;
}
if (offset > dismissDistance || velocity > flingVelocity) {
return SheetHandleDragAction.dismiss;
}
return SheetHandleDragAction.none;
}