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:
@@ -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> {
|
||||
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user