-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Underflowing LazyBlock should relayout for additional children #5956
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
Underflowing LazyBlock should relayout for additional children #5956
Conversation
f729d90 to
eda539b
Compare
abarth
left a comment
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.
LGTM
| for (int i = 0; i < _children.length; i += 1) { | ||
| // If the most recent layout didn't fill the viewport but an additional child | ||
| // is now available, add it to the widgets list which will force a layout. | ||
| int buildChildCount = _underflow ? _children.length + 1 : _children.length; |
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.
final?
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.
I actually removed the final qualifier because most of the code in this file doesn't use it for local vars (that are in fact final).
Would be happy to make another pass and finalize things.
| // we don't need. | ||
|
|
||
| _underflow = currentLogicalOffset < endLogicalOffset; | ||
| if (currentLogicalOffset < endLogicalOffset) { |
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.
I'd change this to if (_underflow) rather than repeating the test.
7f083e5 Don't implicitly fall through in switch statement (flutter/engine#5964) c7ce6dd Apply translation to accessibility tree when in landscape (flutter/engine#5950) aef94b7 Reland "Updated background execution implementation for Android" (flutter/engine#5954) 3421bca Roll src/third_party/skia 36216fb0acbc..177742435e52 (15 commits) (flutter/engine#5963) 9d1e673 Temporarily add travis/analyze.sh back for Chrome bot (flutter/engine#5961) 4386afd Roll src/third_party/skia e6d0618f677c..36216fb0acbc (11 commits) (flutter/engine#5960) 7cef3da Roll src/third_party/skia 01d9a344b575..e6d0618f677c (1 commits) (flutter/engine#5958) ad82cb1 Roll src/third_party/skia fdf05f4ff4e9..01d9a344b575 (1 commits) (flutter/engine#5957) 6ea410c Revert "Roll Dart to 17b54c76ce9b945c6f013ad08c19268409c0694a (flutter/engine#5955)" (flutter#5956) f20c58f Roll Dart to 17b54c76ce9b945c6f013ad08c19268409c0694a (flutter/engine#5955) ed1938e Roll src/third_party/skia 641ac7daa81c..fdf05f4ff4e9 (3 commits) (flutter/engine#5953) 5f04e00 Remove travis directory (flutter/engine#5935) 5442c0a Revert "Updated background execution implementation for Android" (flutter/engine#5949) a5215ce Add hasImplicitScrolling SemanticFlag and support in Android bridge (flutter/engine#5941) 4681351 Roll src/third_party/skia 6e487e67a3f3..641ac7daa81c (16 commits) (flutter/engine#5948) bc885f3 Updated background execution implementation for Android 5770cbd Roll src/third_party/skia 12fb9cfeee07..6e487e67a3f3 (8 commits) (flutter/engine#5946) f4464a8 Roll src/third_party/skia 2e77f54f46e8..12fb9cfeee07 (1 commits) (flutter/engine#5945) c6baaaf Replace acquire+release thread annotation with excludes (flutter/engine#5944) 63ede2e Roll src/third_party/skia 59aabbcf3b0d..2e77f54f46e8 (1 commits) (flutter/engine#5943) 97aea09 Roll src/third_party/skia 71fe8baccc01..59aabbcf3b0d (1 commits) (flutter/engine#5942) aaf4a9a Roll src/third_party/skia 4c3b63e289c5..71fe8baccc01 (3 commits) (flutter/engine#5940)
* Roll engine to 7f083e5 7f083e5 Don't implicitly fall through in switch statement (flutter/engine#5964) c7ce6dd Apply translation to accessibility tree when in landscape (flutter/engine#5950) aef94b7 Reland "Updated background execution implementation for Android" (flutter/engine#5954) 3421bca Roll src/third_party/skia 36216fb0acbc..177742435e52 (15 commits) (flutter/engine#5963) 9d1e673 Temporarily add travis/analyze.sh back for Chrome bot (flutter/engine#5961) 4386afd Roll src/third_party/skia e6d0618f677c..36216fb0acbc (11 commits) (flutter/engine#5960) 7cef3da Roll src/third_party/skia 01d9a344b575..e6d0618f677c (1 commits) (flutter/engine#5958) ad82cb1 Roll src/third_party/skia fdf05f4ff4e9..01d9a344b575 (1 commits) (flutter/engine#5957) 6ea410c Revert "Roll Dart to 17b54c76ce9b945c6f013ad08c19268409c0694a (flutter/engine#5955)" (#5956) f20c58f Roll Dart to 17b54c76ce9b945c6f013ad08c19268409c0694a (flutter/engine#5955) ed1938e Roll src/third_party/skia 641ac7daa81c..fdf05f4ff4e9 (3 commits) (flutter/engine#5953) 5f04e00 Remove travis directory (flutter/engine#5935) 5442c0a Revert "Updated background execution implementation for Android" (flutter/engine#5949) a5215ce Add hasImplicitScrolling SemanticFlag and support in Android bridge (flutter/engine#5941) 4681351 Roll src/third_party/skia 6e487e67a3f3..641ac7daa81c (16 commits) (flutter/engine#5948) bc885f3 Updated background execution implementation for Android 5770cbd Roll src/third_party/skia 12fb9cfeee07..6e487e67a3f3 (8 commits) (flutter/engine#5946) f4464a8 Roll src/third_party/skia 2e77f54f46e8..12fb9cfeee07 (1 commits) (flutter/engine#5945) c6baaaf Replace acquire+release thread annotation with excludes (flutter/engine#5944) 63ede2e Roll src/third_party/skia 59aabbcf3b0d..2e77f54f46e8 (1 commits) (flutter/engine#5943) 97aea09 Roll src/third_party/skia 71fe8baccc01..59aabbcf3b0d (1 commits) (flutter/engine#5942) aaf4a9a Roll src/third_party/skia 4c3b63e289c5..71fe8baccc01 (3 commits) (flutter/engine#5940) * Sync framework changes
Fixes #5950