-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: annoyanceRepeatedly frustrating issues with non-experimental functionalityRepeatedly frustrating issues with non-experimental functionalitya: layoutSystemChrome and Framework's Layout IssuesSystemChrome and Framework's Layout Issuesc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/d: examplesSample code and demosSample code and demosf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Chatted with @HansMuller about this the other day.
Currently, Flutter only estimates the maximum scroll offset one way, but taking the average size of the visible children and multiplying it by the number of children:
| static double _extrapolateMaxScrollOffset( |
This can be a bit unfortunate when the user has a list of dynamically sized items in which the max scroll extent changes as they scroll.
There seem to be some opportunities for improvement here. Things we might consider:
- Adding more strategies for estimating the max scroll offset for different situations
- optionally could let the user decide which estimation method they would like used
- One should be that we cache the metrics as we go, rather than disposing of extent info of children we have scrolled past already
- Better expose an option for users to provide their own estimate
- could just involve a good example or two showing how to override
estimateMaxScrollOffsetfor any SliverChildDelegate, but if there are more approachable options we should explore further
- could just involve a good example or two showing how to override
Related to #25652
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: annoyanceRepeatedly frustrating issues with non-experimental functionalityRepeatedly frustrating issues with non-experimental functionalitya: layoutSystemChrome and Framework's Layout IssuesSystemChrome and Framework's Layout Issuesc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/d: examplesSample code and demosSample code and demosf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team