end method

SheetHandleDragAction end({
  1. required bool expanded,
  2. required double velocity,
})

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;
}