-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
There are two issues in performLayout.
- Rounding error will cause the firstIndex to be off by 1.
getMinChildIndexForScrollOffset will sometimes return 2.9999999 or 1.999999999 which will be floor down to 2 or 1. This cause the layout try to create one additional child before the correct first child. This additional child will later be disposed since it later detects this child is no longer needed.
- LeadingGarbage and trailingGarbage is not calculated correctly in the case of jump or reordering.
ex: childList (0) -> (1) -> (5)
If targetLastIndex = 0, the trailingGarbage will be (5 - 0).clamp(0,3) = 3, where the correct trailingGarbage should be 2.
This will constantly remove the entire childList and later figures out it need to re-populate it back. Same thing for leadingGarbase.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.