diff --git a/lib/src/numberpicker.dart b/lib/src/numberpicker.dart index 63b97a1..8dabcce 100644 --- a/lib/src/numberpicker.dart +++ b/lib/src/numberpicker.dart @@ -104,8 +104,6 @@ class _NumberPickerState extends State { var indexOfMiddleElement = (_scrollController.offset / itemExtent).round(); if (widget.infiniteLoop) { indexOfMiddleElement %= itemCount; - } else { - indexOfMiddleElement = indexOfMiddleElement.clamp(0, itemCount - 1); } final intValueInTheMiddle = _intValueFromIndex(indexOfMiddleElement + additionalItemsOnEachSide);