Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes: #41 (comment)
Ad a breaking change, this delegates the re-fetching trigger from our custom code (reliant on ScrollPsotion) to the SliverList (SlverCosntraints reliant).
This will trigger the re-fetching once the last item in the list is built. That should happen when the viewport hits the bottom of the scrollable cache area.
Now that we rely on the cache area, we don't need
scrollExtentThreshold
nor the SliverInfiniteList needs to be the last sliver on a CustomScrollView.Instead, the user can pass
cacheExtent
to the InfiniteList to customize the cache area of the internal ScrollView. SliverInfiniteList users can pass that to their ownCustomScrollView
.The cache area is not exactly the same as
cacheExtent
since it is applied to both edges of the sliver, not only the trailing one.Breaking changes:
Public member
defaultScrollExtentThreshold
was removed. Any tests and implementations that use it will break.Public members
InfiniteList.scrollExtentThreshold
andSliverInfiniteList.scrollExtentThreshold
were removed. Any implementation that specified these values will break.Default behavior for
InfiniteList.scrollExtentThreshold
andSliverInfiniteList.scrollExtentThreshold
was to applydefaultScrollExtentThreshold
, which was equal to 400 pixels. Now that we rely on cacheExtent, the default value resorts to the frameworksRenderAbstractViewport.defaultCacheExtent
. Which is equal to 250 pixels.Type of Change