Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Give default scroll directions #694

Merged
merged 1 commit into from
Aug 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions sky/packages/sky/lib/widgets/scrollable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -468,7 +472,7 @@ typedef Widget ItemBuilder<T>(T item);
class ScrollableList<T> extends FixedHeightScrollable {
ScrollableList({
Key key,
ScrollDirection scrollDirection,
ScrollDirection scrollDirection: ScrollDirection.vertical,
this.items,
this.itemBuilder,
double itemExtent,
Expand Down Expand Up @@ -498,7 +502,7 @@ class ScrollableList<T> extends FixedHeightScrollable {
class PageableList<T> extends ScrollableList<T> {
PageableList({
Key key,
ScrollDirection scrollDirection,
ScrollDirection scrollDirection: ScrollDirection.horizontal,
List<T> items,
ItemBuilder<T> itemBuilder,
double itemExtent,
Expand Down