Commit bc7256da authored by Adam Barth's avatar Adam Barth

Give default scroll directions

Fixes tests.
parent 7f4aa210
...@@ -347,8 +347,12 @@ class ScrollableBlock extends Component { ...@@ -347,8 +347,12 @@ class ScrollableBlock extends Component {
// about offscreen widgets consuming resources. // about offscreen widgets consuming resources.
abstract class FixedHeightScrollable extends Scrollable { abstract class FixedHeightScrollable extends Scrollable {
FixedHeightScrollable({ Key key, ScrollDirection scrollDirection, this.itemExtent, this.padding }) FixedHeightScrollable({
: super(key: key, scrollDirection: scrollDirection) { Key key,
ScrollDirection scrollDirection: ScrollDirection.vertical,
this.itemExtent,
this.padding
}) : super(key: key, scrollDirection: scrollDirection) {
assert(itemExtent != null); assert(itemExtent != null);
} }
...@@ -468,7 +472,7 @@ typedef Widget ItemBuilder<T>(T item); ...@@ -468,7 +472,7 @@ typedef Widget ItemBuilder<T>(T item);
class ScrollableList<T> extends FixedHeightScrollable { class ScrollableList<T> extends FixedHeightScrollable {
ScrollableList({ ScrollableList({
Key key, Key key,
ScrollDirection scrollDirection, ScrollDirection scrollDirection: ScrollDirection.vertical,
this.items, this.items,
this.itemBuilder, this.itemBuilder,
double itemExtent, double itemExtent,
...@@ -498,7 +502,7 @@ class ScrollableList<T> extends FixedHeightScrollable { ...@@ -498,7 +502,7 @@ class ScrollableList<T> extends FixedHeightScrollable {
class PageableList<T> extends ScrollableList<T> { class PageableList<T> extends ScrollableList<T> {
PageableList({ PageableList({
Key key, Key key,
ScrollDirection scrollDirection, ScrollDirection scrollDirection: ScrollDirection.horizontal,
List<T> items, List<T> items,
ItemBuilder<T> itemBuilder, ItemBuilder<T> itemBuilder,
double itemExtent, double itemExtent,
......
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