From 1cd547886bec36b952456e9ecb9b22307eda6d02 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 19 Aug 2015 11:00:24 -0700 Subject: [PATCH] Give default scroll directions Fixes tests. --- sky/packages/sky/lib/widgets/scrollable.dart | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sky/packages/sky/lib/widgets/scrollable.dart b/sky/packages/sky/lib/widgets/scrollable.dart index e594845e69b98..a83fa4c36bc63 100644 --- a/sky/packages/sky/lib/widgets/scrollable.dart +++ b/sky/packages/sky/lib/widgets/scrollable.dart @@ -347,8 +347,12 @@ class ScrollableBlock extends Component { // about offscreen widgets consuming resources. abstract class FixedHeightScrollable extends Scrollable { - FixedHeightScrollable({ Key key, ScrollDirection scrollDirection, this.itemExtent, this.padding }) - : super(key: key, scrollDirection: scrollDirection) { + FixedHeightScrollable({ + Key key, + ScrollDirection scrollDirection: ScrollDirection.vertical, + this.itemExtent, + this.padding + }) : super(key: key, scrollDirection: scrollDirection) { assert(itemExtent != null); } @@ -468,7 +472,7 @@ typedef Widget ItemBuilder(T item); class ScrollableList extends FixedHeightScrollable { ScrollableList({ Key key, - ScrollDirection scrollDirection, + ScrollDirection scrollDirection: ScrollDirection.vertical, this.items, this.itemBuilder, double itemExtent, @@ -498,7 +502,7 @@ class ScrollableList extends FixedHeightScrollable { class PageableList extends ScrollableList { PageableList({ Key key, - ScrollDirection scrollDirection, + ScrollDirection scrollDirection: ScrollDirection.horizontal, List items, ItemBuilder itemBuilder, double itemExtent,