Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Li committed Aug 5, 2019
1 parent 3e0dbfd commit 99a57d6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/pages/category_page/category_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ class _CategoryPageState extends State<CategoryPage> {
}

_leftAnimateToIndex(int index) {
setState(() {
_selectedCategory = _categorys[index];
});
_scrollController.animateTo(index * 60.0,
duration: Duration(milliseconds: 200), curve: Curves.ease);
if (_selectedCategory['index'] != index) {
setState(() {
_selectedCategory = _categorys[index];
});
_scrollController.position.moveTo(index * 60.0);
}
}

_rightAnimateToIndex(f) {
Expand Down

0 comments on commit 99a57d6

Please sign in to comment.