Skip to content

Make sure that an AnimatedSlide doesn't crash in 0x0 environment#181535

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
ahmedsameha1:handle#6537-AnimatedSlide
Feb 25, 2026
Merged

Make sure that an AnimatedSlide doesn't crash in 0x0 environment#181535
auto-submit[bot] merged 4 commits into
flutter:masterfrom
ahmedsameha1:handle#6537-AnimatedSlide

Conversation

@ahmedsameha1
Copy link
Copy Markdown
Contributor

This is my attempt to handle #6537 for the AnimatedSlide widget.

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. a: animation Animation APIs labels Jan 27, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a regression test for a crash in AnimatedSlide when it's in a zero-sized environment. The test case correctly sets up the scenario by placing an AnimatedSlide inside a SizedBox.shrink(). It then verifies that animations can settle without crashing and that the widget's final size is zero. The test is well-written and effectively covers the reported issue.

),
),
);
await tester.pumpAndSettle();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also check the size mid-animation?

@victorsanni victorsanni requested a review from dkwingsmt January 27, 2026 18:30
@dkwingsmt dkwingsmt added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 27, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Jan 27, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jan 27, 2026
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 27, 2026
@loic-sharma
Copy link
Copy Markdown
Member

loic-sharma commented Jan 28, 2026

Hello @ahmedsameha1, a huge thanks for all these 0x0 environment pull requests - we really appreciate all the excellent work you've done to improve the framework's quality!

I'm reaching out because we've noticed that the volume of pull requests is putting a significant strain on our CI infrastructure. To help us keep the CI running smoothly for everyone, would you be open to bundle smaller 0x0 pull requests into single, larger pull requests? In particular, I'd consider bundling pull requests that only add a test without needing any fixes to the underlying widget itself. For example:

  1. Make sure that an AnimatedSlide doesn't crash in 0x0 environment #181535
  2. Make sure that an AnimatedScale doesn't crash in 0x0 environment #181481

Normally we prefer smaller pull requests, but in this case the CI overhead is proving to be significant. For more contrived 0x0 changes - for example if the widget itself needs fixes - feel keep these as standalone PRs. Thanks again for all the wonderful contributions!

@ahmedsameha1
Copy link
Copy Markdown
Contributor Author

@loic-sharma Do you suggest that I should do the remaining widgets that do not need fixes in the widget code in one pull request?
Should I merge these two pull requests into one, or do them in that big pull request, or leave them as is?

@loic-sharma
Copy link
Copy Markdown
Member

loic-sharma commented Jan 29, 2026

@ahmedsameha1 Feel free to leave the current pull requests as is. However, for future pull requests I'd consider combining multiple pull requests together until the pull request reaches ~1000 lines of code. That should be a good balance of reducing CI usage while still being reviewable.

@ahmedsameha1
Copy link
Copy Markdown
Contributor Author

@ahmedsameha1 Feel free to leave the current pull requests as is. However, for future pull requests I'd consider combining multiple pull requests together until the pull request reaches ~1000 lines of code. That should be a good balance of reducing CI usage while still being reviewable.

Ok, I hope that the issue will not be assigned to another contributor, as the next pull request for this issue may be after two months!

@loic-sharma
Copy link
Copy Markdown
Member

I hope that the issue will not be assigned to another contributor, as the next pull request for this issue may be after two months!

@ahmedsameha1 Ah apologies, 2 months sounds like that might be too much bundling! I'd like to make sure you're still able to land incremental progress.

What do you think of this guideline instead: combine multiple pull requests together until the pull request either updates 10 widgets, or, reaches ~1000 lines of code - whichever comes first?

And yup we can keep the issue assigned to you! :)

@ahmedsameha1
Copy link
Copy Markdown
Contributor Author

I hope that the issue will not be assigned to another contributor, as the next pull request for this issue may be after two months!

@ahmedsameha1 Ah apologies, 2 months sounds like that might be too much bundling! I'd like to make sure you're still able to land incremental progress.

What do you think of this guideline instead: combine multiple pull requests together until the pull request either updates 10 widgets, or, reaches ~1000 lines of code - whichever comes first?

And yup we can keep the issue assigned to you! :)

Ok.

@justinmc
Copy link
Copy Markdown
Contributor

justinmc commented Feb 3, 2026

Thanks @ahmedsameha1, and sorry I think I might have suggested that you split these up into individual PRs back when you started on this :) Thanks for being flexible.

@ahmedsameha1
Copy link
Copy Markdown
Contributor Author

Thanks @ahmedsameha1, and sorry I think I might have suggested that you split these up into individual PRs back when you started on this :) Thanks for being flexible.

Anyway, this made me one of the most prolific community authors in the flutter/flutter repository in 2025. It is my pleasure to be a contributor to this community, either way.

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 24, 2026
@auto-submit
Copy link
Copy Markdown
Contributor

auto-submit Bot commented Feb 24, 2026

autosubmit label was removed for flutter/flutter/181535, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 24, 2026
@dkwingsmt dkwingsmt added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 24, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Feb 25, 2026
Merged via the queue into flutter:master with commit 1567206 Feb 25, 2026
74 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 25, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 25, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 25, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 25, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 26, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 26, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Feb 26, 2026
Roll Flutter from dad6f9d4107a to b31548feb941 (39 revisions)

flutter/flutter@dad6f9d...b31548f

2026-02-25 mdebbar@google.com [web] Fix failure on Firefox 148 (flutter/flutter#182855)
2026-02-25 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from KfPgw04T0OEADLJA5... to XI0Ax7fbtYE4XKYAQ... (flutter/flutter#182887)
2026-02-25 50643541+Mairramer@users.noreply.github.com Use AnimationStyle curve and reverseCurve in ModalBottomSheet animation (flutter/flutter#181403)
2026-02-25 engine-flutter-autoroll@skia.org Roll Dart SDK from fd3dce5b6a4e to 5c57e75f1102 (9 revisions) (flutter/flutter#182801)
2026-02-25 98614782+auto-submit[bot]@users.noreply.github.com Reverts "refactor: remove material in context_menu_controller_test, icon_test, list_wheel_scroll_view_test, media_query_test, platform_menu_bar_test (#182697)" (flutter/flutter#182879)
2026-02-25 ahmedsameha1@gmail.com Make sure that an AnimatedSlide doesn't crash in 0x0 environment (flutter/flutter#181535)
2026-02-24 jmccandless@google.com Reland Standardize on Test* widgets in *_tester.dart files (flutter/flutter#182632)
2026-02-24 nhan13574@gmail.com docs(Path): clarify that zero-length contours are excluded from computeMetrics (flutter/flutter#180165)
2026-02-24 mdebbar@google.com Fix typo in assert message (flutter/flutter#182843)
2026-02-24 matej.knopp@gmail.com [win32] Fix overflow in TaskRunnerWindow. (flutter/flutter#182822)
2026-02-24 abadasamuelosp@gmail.com feat: Add --no-uninstall flag to flutter test for integration tests (flutter/flutter#182714)
2026-02-24 74057391+jhonathanqz@users.noreply.github.com Rename noFrequencyBasedMinification to useFrequencyBasedMinification (flutter/flutter#182684)
2026-02-24 60122246+xiaowei-guan@users.noreply.github.com [Impeller] Fix fail to render pixel buffer texture on Linux (flutter/flutter#181656)
2026-02-24 15619084+vashworth@users.noreply.github.com Remove FlutterFramework app migration (flutter/flutter#182100)
2026-02-24 engine-flutter-autoroll@skia.org Roll Packages from 12b43a1 to 062c8d4 (5 revisions) (flutter/flutter#182839)
2026-02-24 mdebbar@google.com [web] Run webparagraph tests in CI (flutter/flutter#182092)
2026-02-24 jason-simmons@users.noreply.github.com Fix a race in EmbedderTest.CanSpecifyCustomUITaskRunner (flutter/flutter#182649)
2026-02-24 srawlins@google.com flutter_tools: Use a super-parameter in several missed cases (flutter/flutter#182581)
2026-02-24 116356835+AbdeMohlbi@users.noreply.github.com Replace more references to `flutter/engine` with `flutter/flutter` (flutter/flutter#182654)
2026-02-24 50643541+Mairramer@users.noreply.github.com Carousel: Migration from Scrollable+Viewport to CustomScrollView (flutter/flutter#182475)
2026-02-24 97480502+b-luk@users.noreply.github.com Refactor impellerc_main to better organize some of its logic (flutter/flutter#182783)
2026-02-24 116356835+AbdeMohlbi@users.noreply.github.com Remove unused `getPluginList ` (flutter/flutter#182660)
2026-02-24 34465683+rkishan516@users.noreply.github.com Refactor: Remove material from ticker provider test (flutter/flutter#181697)
2026-02-24 engine-flutter-autoroll@skia.org Roll Skia from 26eebffe12bd to f44d7db68805 (3 revisions) (flutter/flutter#182821)
2026-02-24 34465683+rkishan516@users.noreply.github.com refactor: remove material in context_menu_controller_test, icon_test, list_wheel_scroll_view_test, media_query_test, platform_menu_bar_test (flutter/flutter#182697)
2026-02-24 engine-flutter-autoroll@skia.org Roll Skia from 7dad66aae75a to 26eebffe12bd (5 revisions) (flutter/flutter#182810)
2026-02-24 pokepsi@gmail.com Update roadmap for 2026 (flutter/flutter#182798)
2026-02-24 fluttergithubbot@gmail.com Marks Windows tool_tests_commands_1_2 to be unflaky (flutter/flutter#179670)
2026-02-23 zhongliu88889@gmail.com [web] scroll iOS iframe text input into view (flutter/flutter#179759)
2026-02-23 Mail@maikwild.de Fix textscaler clamp assertion error (flutter/flutter#181716)
2026-02-23 engine-flutter-autoroll@skia.org Roll Skia from 9a5a3c92c336 to 7dad66aae75a (4 revisions) (flutter/flutter#182779)
2026-02-23 116356835+AbdeMohlbi@users.noreply.github.com Move more getters from userMessages class to the appropriate places (flutter/flutter#182656)
2026-02-23 engine-flutter-autoroll@skia.org Manual roll Dart SDK from f8fac50475b8 to fd3dce5b6a4e (6 revisions) (flutter/flutter#182768)
2026-02-23 15619084+vashworth@users.noreply.github.com Copy Flutter framework to Add to App FlutterPluginRgistrant (flutter/flutter#182523)
2026-02-23 mr-peipei@web.de Add progress indicator to artifact downloads (flutter/flutter#181808)
2026-02-23 47866232+chunhtai@users.noreply.github.com Clarify batch release mode requirements (flutter/flutter#182228)
2026-02-23 mdebbar@google.com [web] Remove --disable-gpu from flutter chrome tests (flutter/flutter#182618)
2026-02-23 jwren@google.com running-apps: update running-apps to use Duration.ago() (flutter/flutter#182172)
2026-02-23 kevmoo@users.noreply.github.com Refactor bin/ shell scripts for better performance and safety (flutter/flutter#182674)

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 louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

...
ahmedsameha1 added a commit to ahmedsameha1/flutter that referenced this pull request Feb 27, 2026
…tter#181535)

This is my attempt to handle
flutter#6537 for the AnimatedSlide
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
okorohelijah pushed a commit to okorohelijah/packages that referenced this pull request Mar 26, 2026
…r#11116)

Roll Flutter from dad6f9d4107a to b31548feb941 (39 revisions)

flutter/flutter@dad6f9d...b31548f

2026-02-25 mdebbar@google.com [web] Fix failure on Firefox 148 (flutter/flutter#182855)
2026-02-25 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from KfPgw04T0OEADLJA5... to XI0Ax7fbtYE4XKYAQ... (flutter/flutter#182887)
2026-02-25 50643541+Mairramer@users.noreply.github.com Use AnimationStyle curve and reverseCurve in ModalBottomSheet animation (flutter/flutter#181403)
2026-02-25 engine-flutter-autoroll@skia.org Roll Dart SDK from fd3dce5b6a4e to 5c57e75f1102 (9 revisions) (flutter/flutter#182801)
2026-02-25 98614782+auto-submit[bot]@users.noreply.github.com Reverts "refactor: remove material in context_menu_controller_test, icon_test, list_wheel_scroll_view_test, media_query_test, platform_menu_bar_test (#182697)" (flutter/flutter#182879)
2026-02-25 ahmedsameha1@gmail.com Make sure that an AnimatedSlide doesn't crash in 0x0 environment (flutter/flutter#181535)
2026-02-24 jmccandless@google.com Reland Standardize on Test* widgets in *_tester.dart files (flutter/flutter#182632)
2026-02-24 nhan13574@gmail.com docs(Path): clarify that zero-length contours are excluded from computeMetrics (flutter/flutter#180165)
2026-02-24 mdebbar@google.com Fix typo in assert message (flutter/flutter#182843)
2026-02-24 matej.knopp@gmail.com [win32] Fix overflow in TaskRunnerWindow. (flutter/flutter#182822)
2026-02-24 abadasamuelosp@gmail.com feat: Add --no-uninstall flag to flutter test for integration tests (flutter/flutter#182714)
2026-02-24 74057391+jhonathanqz@users.noreply.github.com Rename noFrequencyBasedMinification to useFrequencyBasedMinification (flutter/flutter#182684)
2026-02-24 60122246+xiaowei-guan@users.noreply.github.com [Impeller] Fix fail to render pixel buffer texture on Linux (flutter/flutter#181656)
2026-02-24 15619084+vashworth@users.noreply.github.com Remove FlutterFramework app migration (flutter/flutter#182100)
2026-02-24 engine-flutter-autoroll@skia.org Roll Packages from 12b43a1 to 062c8d4 (5 revisions) (flutter/flutter#182839)
2026-02-24 mdebbar@google.com [web] Run webparagraph tests in CI (flutter/flutter#182092)
2026-02-24 jason-simmons@users.noreply.github.com Fix a race in EmbedderTest.CanSpecifyCustomUITaskRunner (flutter/flutter#182649)
2026-02-24 srawlins@google.com flutter_tools: Use a super-parameter in several missed cases (flutter/flutter#182581)
2026-02-24 116356835+AbdeMohlbi@users.noreply.github.com Replace more references to `flutter/engine` with `flutter/flutter` (flutter/flutter#182654)
2026-02-24 50643541+Mairramer@users.noreply.github.com Carousel: Migration from Scrollable+Viewport to CustomScrollView (flutter/flutter#182475)
2026-02-24 97480502+b-luk@users.noreply.github.com Refactor impellerc_main to better organize some of its logic (flutter/flutter#182783)
2026-02-24 116356835+AbdeMohlbi@users.noreply.github.com Remove unused `getPluginList ` (flutter/flutter#182660)
2026-02-24 34465683+rkishan516@users.noreply.github.com Refactor: Remove material from ticker provider test (flutter/flutter#181697)
2026-02-24 engine-flutter-autoroll@skia.org Roll Skia from 26eebffe12bd to f44d7db68805 (3 revisions) (flutter/flutter#182821)
2026-02-24 34465683+rkishan516@users.noreply.github.com refactor: remove material in context_menu_controller_test, icon_test, list_wheel_scroll_view_test, media_query_test, platform_menu_bar_test (flutter/flutter#182697)
2026-02-24 engine-flutter-autoroll@skia.org Roll Skia from 7dad66aae75a to 26eebffe12bd (5 revisions) (flutter/flutter#182810)
2026-02-24 pokepsi@gmail.com Update roadmap for 2026 (flutter/flutter#182798)
2026-02-24 fluttergithubbot@gmail.com Marks Windows tool_tests_commands_1_2 to be unflaky (flutter/flutter#179670)
2026-02-23 zhongliu88889@gmail.com [web] scroll iOS iframe text input into view (flutter/flutter#179759)
2026-02-23 Mail@maikwild.de Fix textscaler clamp assertion error (flutter/flutter#181716)
2026-02-23 engine-flutter-autoroll@skia.org Roll Skia from 9a5a3c92c336 to 7dad66aae75a (4 revisions) (flutter/flutter#182779)
2026-02-23 116356835+AbdeMohlbi@users.noreply.github.com Move more getters from userMessages class to the appropriate places (flutter/flutter#182656)
2026-02-23 engine-flutter-autoroll@skia.org Manual roll Dart SDK from f8fac50475b8 to fd3dce5b6a4e (6 revisions) (flutter/flutter#182768)
2026-02-23 15619084+vashworth@users.noreply.github.com Copy Flutter framework to Add to App FlutterPluginRgistrant (flutter/flutter#182523)
2026-02-23 mr-peipei@web.de Add progress indicator to artifact downloads (flutter/flutter#181808)
2026-02-23 47866232+chunhtai@users.noreply.github.com Clarify batch release mode requirements (flutter/flutter#182228)
2026-02-23 mdebbar@google.com [web] Remove --disable-gpu from flutter chrome tests (flutter/flutter#182618)
2026-02-23 jwren@google.com running-apps: update running-apps to use Duration.ago() (flutter/flutter#182172)
2026-02-23 kevmoo@users.noreply.github.com Refactor bin/ shell scripts for better performance and safety (flutter/flutter#182674)

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 louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

...
mboetger pushed a commit to mboetger/flutter that referenced this pull request Mar 26, 2026
…tter#181535)

This is my attempt to handle
flutter#6537 for the AnimatedSlide
widget.

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: animation Animation APIs framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants