提交 ed041a29 编写于 作者: A Adam Barth

Merge pull request #1501 from abarth/initial_page

PageableList should take initialPage instead of initialScrollOffset
......@@ -575,7 +575,7 @@ typedef void PageChangedCallback(int newPage);
class PageableList<T> extends ScrollableList<T> {
PageableList({
Key key,
double initialScrollOffset,
int initialPage,
ScrollDirection scrollDirection: ScrollDirection.horizontal,
ScrollListener onScroll,
List<T> items,
......@@ -588,7 +588,7 @@ class PageableList<T> extends ScrollableList<T> {
this.curve: ease
}) : super(
key: key,
initialScrollOffset: initialScrollOffset,
initialScrollOffset: initialPage == null ? null : initialPage * itemExtent,
scrollDirection: scrollDirection,
onScroll: onScroll,
items: items,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册