Skip to content

Commit

Permalink
Merge c226ff4 into c575068
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinusX committed Mar 18, 2021
2 parents c575068 + c226ff4 commit e63b780
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## [2.0.1]

* Fixed empty scrollController position bug #95

## [2.0.0] **BREAKING CHANGES**
* Migrate to **null-safety**.
* Changed named constructors to two separate widgets.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/numberpicker.dart
Expand Up @@ -210,7 +210,7 @@ class _NumberPickerState extends State<NumberPicker> {
}

void _maybeCenterValue() {
if (!isScrolling) {
if (_scrollController.hasClients && !isScrolling) {
int diff = widget.value - widget.minValue;
int index = diff ~/ widget.step;
_scrollController.animateTo(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,5 +1,5 @@
name: numberpicker
version: 2.0.0
version: 2.0.1
description: NumberPicker is a widget allowing user to choose numbers by scrolling spinners.
homepage: https://github.com/MarcinusX/NumberPicker

Expand Down

0 comments on commit e63b780

Please sign in to comment.