LazyBlock docs and physics
This patch adds dartdoc to LazyBlock. Also, this patch fixes the scrolling physics of LazyBlock. Previously, we updated a running simulation only when the change in scroll behavior changed the current scroll offset. Now we update running simulations every time the behavior changes because the simulation might depend on quantities other than the current scroll offset.
This commit is contained in:
@@ -418,7 +418,7 @@ class CardCollectionState extends State<CardCollection> {
|
||||
);
|
||||
} else {
|
||||
cardCollection = new LazyBlock(
|
||||
delegate: new LazyBlockBuilder(_buildCard),
|
||||
delegate: new LazyBlockBuilder(builder: _buildCard),
|
||||
snapOffsetCallback: _snapToCenter ? _toSnapOffset : null
|
||||
);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ class CardBuilder extends LazyBlockDelegate {
|
||||
class OverlayGeometryAppState extends State<OverlayGeometryApp> {
|
||||
List<CardModel> cardModels;
|
||||
Map<MarkerType, Point> markers = new Map<MarkerType, Point>();
|
||||
double markersScrollOffset;
|
||||
double markersScrollOffset = 0.0;
|
||||
ScrollListener scrollListener;
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user