Repository navigation
fix: map scroll cacheExtent to Flutter 3.41 ScrollCacheExtent #489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: StacDev/stac
Length of output: 32683
🏁 Script executed:
Repository: StacDev/stac
Length of output: 17294
🏁 Script executed:
Repository: StacDev/stac
Length of output: 4043
🌐 Web query:
Flutter ScrollCacheExtent ScrollView scrollCacheExtent introduced Flutter 3.41.0-0.0.pre stable 3.44 official documentation💡 Result:
The scrollCacheExtent property and the accompanying ScrollCacheExtent class were introduced in Flutter to replace the legacy cacheExtent (double) and cacheExtentStyle (enum) properties [1][2]. This change was initiated as a breaking change to improve API clarity, type safety, and maintainability by encapsulating the cache value and its styling strategy into a single object [1][3]. The scrollCacheExtent property is available in scrolling widgets such as ScrollView, ListView, GridView, and PageView, as well as in their corresponding render objects like RenderViewportBase [1][4][5]. Key details regarding this change: - Deprecation: The old properties cacheExtent and cacheExtentStyle were deprecated starting with Flutter version 3.41.0-0.0.pre [6][4]. - Functionality: The new ScrollCacheExtent class allows developers to define the caching strategy explicitly using two factory constructors: - ScrollCacheExtent.pixels(double pixels): Defines the cache area in logical pixels [3]. - ScrollCacheExtent.viewport(double value): Defines the cache area as a multiplier of the viewport's main axis extent [3]. - Purpose: The cache area allows the framework to lay out and render items before they become visible, which helps ensure a smoother scrolling experience [7][3]. It is also used to implement implicit accessibility scrolling on platforms like iOS [7]. For migration, if you previously used cacheExtent, you should now use scrollCacheExtent with ScrollCacheExtent.pixels. If you used cacheExtent with CacheExtentStyle.viewport, you should switch to ScrollCacheExtent.viewport [1].
Citations:
Raise the minimum Flutter SDK constraint.
packages/stac/pubspec.yamldeclares Flutter>=1.17.0, but these parsers useScrollCacheExtent, introduced in Flutter3.41.0-0.0.pre. The stable-channel CI does not test the declared minimum. Raise the constraint or retain the legacy API.📍 Affects 3 files
packages/stac/lib/src/parsers/widgets/stac_custom_scroll_view/stac_custom_scroll_view_parser.dart#L36-L38(this comment)packages/stac/lib/src/parsers/widgets/stac_grid_view/stac_grid_view_parser.dart#L43-L45packages/stac/lib/src/parsers/widgets/stac_list_view/stac_list_view_parser.dart#L39-L41🤖 Prompt for AI Agents
Source: MCP tools