Commit ee0c01c5 authored by Adam Barth's avatar Adam Barth

Merge pull request #1501 from abarth/initial_page

PageableList should take initialPage instead of initialScrollOffset
parents 7f634678 7ac6ab6f
...@@ -575,7 +575,7 @@ typedef void PageChangedCallback(int newPage); ...@@ -575,7 +575,7 @@ typedef void PageChangedCallback(int newPage);
class PageableList<T> extends ScrollableList<T> { class PageableList<T> extends ScrollableList<T> {
PageableList({ PageableList({
Key key, Key key,
double initialScrollOffset, int initialPage,
ScrollDirection scrollDirection: ScrollDirection.horizontal, ScrollDirection scrollDirection: ScrollDirection.horizontal,
ScrollListener onScroll, ScrollListener onScroll,
List<T> items, List<T> items,
...@@ -588,7 +588,7 @@ class PageableList<T> extends ScrollableList<T> { ...@@ -588,7 +588,7 @@ class PageableList<T> extends ScrollableList<T> {
this.curve: ease this.curve: ease
}) : super( }) : super(
key: key, key: key,
initialScrollOffset: initialScrollOffset, initialScrollOffset: initialPage == null ? null : initialPage * itemExtent,
scrollDirection: scrollDirection, scrollDirection: scrollDirection,
onScroll: onScroll, onScroll: onScroll,
items: items, items: items,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment