From a3885659c559546064e7bfec6acf474d02ea944c Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 12 Mar 2015 10:36:09 -0700 Subject: [PATCH] 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 --- examples/stocks-fn/stocklist.dart | 2 +- examples/stocks-fn/stocksapp.dart | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/stocks-fn/stocklist.dart b/examples/stocks-fn/stocklist.dart index 50c64f36001..d904ef1c2a8 100644 --- a/examples/stocks-fn/stocklist.dart +++ b/examples/stocks-fn/stocklist.dart @@ -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 buildItems(int start, int count) { return stocks diff --git a/examples/stocks-fn/stocksapp.dart b/examples/stocks-fn/stocksapp.dart index d392d659c73..7923c7197b4 100644 --- a/examples/stocks-fn/stocksapp.dart +++ b/examples/stocks-fn/stocksapp.dart @@ -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';