-
Notifications
You must be signed in to change notification settings - Fork 29.7k
MergeableMaterial: Fix adding a slice and separating it #128804
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
Conversation
e3cb7cf to
eddad96
Compare
QuncCccccc
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.
Thanks a lot for the contribution!! This looks good:) Just left one question and some nits below.
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.
In _insertChild method, there is a check if (child is MaterialGap) {. So should we just add this line in that check and revert the code change here in this while loop?
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.
It is not always AnimationController.forward() that is used when _inserChild is called for a MaterialGap. There are cases within didUpdateWidget where it is AnimationController.reverse() or the animation is not being touched at all like in these places:
The handling of a gap's animation is decided for each gap insertion case.
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.
Ah I see. Thanks for the explanation!
from existing slice
eddad96 to
ec9490c
Compare
QuncCccccc
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! Thanks:)
gspencergoog
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.
flutter/flutter@35085c3...bc49cd1 2023-07-06 [email protected] Allow long-press gestures to continue even if buttons change. (flutter/flutter#127877) 2023-07-06 [email protected] Enable unreachable_from_main lint - it is stable now!!1 (flutter/flutter#129854) 2023-07-06 [email protected] Update labeler to new label names (flutter/flutter#130040) 2023-07-05 [email protected] MergeableMaterial: Fix adding a slice and separating it (flutter/flutter#128804) 2023-07-05 [email protected] Update infrastructure issue template for new priority scheme (flutter/flutter#129741) 2023-07-05 [email protected] Fix typo in canvas example (flutter/flutter#129879) 2023-07-05 [email protected] Reland Fix AnimatedList & AnimatedGrid doesn't apply MediaQuery padding #129556 (flutter/flutter#129860) 2023-07-05 [email protected] Change from "created via performance template" to "from: performance template" (flutter/flutter#130035) 2023-07-05 [email protected] Removes deprecated APIs from v2.6 in `binding.dart` and `widget_tester.dart` (flutter/flutter#129663) 2023-07-05 [email protected] Add new hot reload case string (flutter/flutter#130008) 2023-07-05 [email protected] Manual roll Flutter Engine from 987b621eac4e to bd2e42b203e1 (32 revisions) (flutter/flutter#130023) 2023-07-05 [email protected] Add simple unit tests for annotations.dart file (flutter/flutter#128902) 2023-07-05 [email protected] fix a bug when android uses CupertinoPageTransitionsBuilder... (flutter/flutter#114303) 2023-07-05 [email protected] Add .env file support for option `--dart-define-from-file` (flutter/flutter#128668) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Fixes #128646
It is possible to add a
MaterialGapto aMergeableMaterialwithout itsAnimationControllerfor the separation animation being kicked off.This leads to the gap instantly being removed again by
_removeEmptyGaps()during the next build.The fix adds an
AnimationController.forward()call where theMaterialGapinsertion happens.I found this bug while using
ExpansionPanelListas the issue describes. Here is a video of anExpansionPanelListbefore and after the fix. Note the gaps between the panels:Before
2023-06-11.03-12-09.mp4
After
2023-06-13.18-29-52.mp4
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.