Fix scrolling of multiple SliverLists and SliverGrids (#14449)

* Fix scrolling of multiple SliverLists and SliverGrids

* Update sliver_fixed_extent_list.dart

* Update sliver_grid.dart
This commit is contained in:
Ian Hickson
2018-02-05 13:56:28 -08:00
committed by GitHub
parent 3c379aaf43
commit e810bee6e5
8 changed files with 165 additions and 23 deletions

View File

@@ -84,9 +84,7 @@ class _ShrineGridLayout extends SliverGridLayout {
}
@override
double estimateMaxScrollOffset(int childCount) {
if (childCount == null)
return null;
double computeMaxScrollOffset(int childCount) {
if (childCount == 0)
return 0.0;
final int rowCount = _rowAtIndex(childCount - 1) + 1;