OMG I've been running with checking turned off. Fixed scrollbar assertion failures.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user