Factor ScrollCurve out of Scrollable

Intead of hard-coding the notion of bounded scrolling into Scrollable, this CL
factors out a ScrollCurve class that applies the bounds. In the future, we'll
refine this mechanism to implement overflow scrolling.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1005633002
This commit is contained in:
Adam Barth 2015-03-12 10:36:09 -07:00
parent d8fe727434
commit a3885659c5
2 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class Stocklist extends FixedHeightScrollable {
Object key,
this.stocks,
this.query
}) : super(key: key, minOffset: 0.0);
}) : super(key: key, scrollCurve: new BoundedScrollCurve(minOffset: 0.0));
List<Node> buildItems(int start, int count) {
return stocks

View File

@ -1,6 +1,7 @@
library stocksapp;
import '../../framework/fn.dart';
import '../../framework/animation/scroll_curve.dart';
import '../../framework/components/drawer.dart';
import '../../framework/components/drawer_header.dart';
import '../../framework/components/fixed_height_scrollable.dart';