Add a scrollbar to the license screen. (#5114)

And make Scrollbar work with LazyBlock.

And an about box to the Stocks sample app.
This commit is contained in:
Ian Hickson
2016-07-29 15:44:12 -07:00
committed by GitHub
parent 2b3099c814
commit 51f8fb9979
15 changed files with 278 additions and 126 deletions

View File

@@ -64,6 +64,11 @@ class FancyItemDelegate extends LazyBlockDelegate {
@override
bool shouldRebuild(FancyItemDelegate oldDelegate) => false;
@override
double estimateTotalExtent(int firstIndex, int lastIndex, double minOffset, double firstStartOffset, double lastEndOffset) {
return double.INFINITY;
}
}
class ComplexLayoutState extends State<ComplexLayout> {

View File

@@ -125,6 +125,11 @@ class CardBuilder extends LazyBlockDelegate {
bool shouldRebuild(CardBuilder oldDelegate) {
return oldDelegate.cardModels != cardModels;
}
@override
double estimateTotalExtent(int firstIndex, int lastIndex, double minOffset, double firstStartOffset, double lastEndOffset) {
return (lastEndOffset - minOffset) * cardModels.length / (lastIndex + 1);
}
}
class OverlayGeometryAppState extends State<OverlayGeometryApp> {