-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Added onEnd callback into AnimatedSize #139859
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
Added onEnd callback into AnimatedSize #139859
Conversation
| } | ||
|
|
||
| void _animationStatusListener(AnimationStatus status) { | ||
| if (status == AnimationStatus.completed) { |
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.
This should be a switch per our style guide: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-using-if-chains-or--or--with-enum-values
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.
Done
|
|
||
| class _AnimatedSizeState | ||
| extends State<AnimatedSize> with SingleTickerProviderStateMixin { | ||
| extends State<AnimatedSize> with SingleTickerProviderStateMixin { |
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.
please undo this whitespace change
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.
Done
| ), | ||
| ); | ||
|
|
||
|
|
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.
nit: remove one of the blank lines
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.
Done
| }); | ||
|
|
||
| testWidgetsWithLeakTracking('calls onEnd when animation is completed', (WidgetTester tester) async { | ||
| await tester.pumpWidget( |
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.
You can simplify this. remove the mockOnEndFunction stuff and just define an inline function here:
int callCount = 0;
void handleEnd() {
callCount++;
}and then just pass handleEnd wherever you need it
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.
Done
goderbauer
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
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@0eb7881...da0cd69 2023-12-20 [email protected] Revert automated changes made to deprecated settings.gradle (plugins.each) (flutter/flutter#140037) 2023-12-20 [email protected] [github actions] change minimal example workflow to be manually dispatched (flutter/flutter#140435) 2023-12-20 [email protected] Make `TextSpan` hit testing precise. (flutter/flutter#139717) 2023-12-20 [email protected] [github actions] add minimal workflow to test token (flutter/flutter#140363) 2023-12-20 [email protected] Roll Flutter Engine from 5279873a8635 to c70f0a495ace (2 revisions) (flutter/flutter#140431) 2023-12-20 [email protected] Roll Flutter Engine from df1593e96a6b to 5279873a8635 (2 revisions) (flutter/flutter#140428) 2023-12-20 [email protected] [flutter_tools] handle FileSystemException trying to delete temp directory from core_devices.dart (flutter/flutter#140415) 2023-12-19 [email protected] Move hybrid_android_views_integration_test back to Moto G4 (flutter/flutter#140421) 2023-12-19 [email protected] Roll Flutter Engine from 3b156c8ce9bd to df1593e96a6b (2 revisions) (flutter/flutter#140422) 2023-12-19 [email protected] Added onEnd callback into AnimatedSize (flutter/flutter#139859) 2023-12-19 [email protected] Roll Flutter Engine from 3f45f9db4471 to 3b156c8ce9bd (1 revision) (flutter/flutter#140413) 2023-12-19 [email protected] Roll Flutter Engine from 187334c39b44 to 3f45f9db4471 (3 revisions) (flutter/flutter#140412) 2023-12-19 [email protected] Remove workarounds for `plugin_lint_mac` needed for older version of Cocoapods (flutter/flutter#140395) 2023-12-19 [email protected] Roll Flutter Engine from b87a782ce3a3 to 187334c39b44 (2 revisions) (flutter/flutter#140398) 2023-12-19 [email protected] Roll Flutter Engine from 1d5a141917fa to b87a782ce3a3 (1 revision) (flutter/flutter#140390) 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

close #106439
Pre-launch Checklist
///).