Commit 2609f7bf authored by Hans Muller's avatar Hans Muller

OMG I've been running with checking turned off. Fixed scrollbar assertion failures.

parent f77319fc
......@@ -23,7 +23,12 @@ class ScrollbarAppState extends State<ScrollbarApp> {
return new ScrollableList<int>(
items: new List<int>.generate(_itemCount, (int i) => i),
itemExtent: _itemExtent,
itemBuilder: (BuildContext _, int i) => new Text('Item ${dd.format(i)}', style: Theme.of(context).text.title),
itemBuilder: (_, int i) {
return new Text('Item ${dd.format(i)}',
key: new ValueKey<int>(i),
style: Theme.of(context).text.title
);
},
scrollableListPainter: _scrollbarPainter
);
}
......
......@@ -434,7 +434,6 @@ abstract class ScrollableListPainter extends Painter {
double _scrollOffset = 0.0;
void set scrollOffset (double value) {
assert(value != null);
assert(value >= 0.0 && value <= 1.0);
if (_scrollOffset == value)
return;
_scrollOffset = value;
......
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