From c497afdea5e7734a32f38bac9d9f34af7df763e4 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Tue, 11 Nov 2025 18:15:48 +0000 Subject: [PATCH 1/2] [animations] Clarify that onClosed is called before transition --- packages/animations/CHANGELOG.md | 4 ++++ packages/animations/lib/src/open_container.dart | 3 ++- packages/animations/pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md index 1b2952928e5..e5831c7b43a 100644 --- a/packages/animations/CHANGELOG.md +++ b/packages/animations/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.1 + +* Updated the documentation for `OpenContainer.onClosed` to clarify that it is called at the start of the closing transition, not at the end. + ## 2.1.0 * Updates examples to use the new RadioGroup API instead of deprecated Radio parameters. diff --git a/packages/animations/lib/src/open_container.dart b/packages/animations/lib/src/open_container.dart index d9d601a43ed..b1cd117d99f 100644 --- a/packages/animations/lib/src/open_container.dart +++ b/packages/animations/lib/src/open_container.dart @@ -190,7 +190,8 @@ class OpenContainer extends StatefulWidget { /// * [Material.shape], which is used to implement this property. final ShapeBorder openShape; - /// Called when the container was popped and has returned to the closed state. + /// Called when the container was popped and is about to transition back to + /// the closed state. /// /// The return value from the popped screen is passed to this function as an /// argument. diff --git a/packages/animations/pubspec.yaml b/packages/animations/pubspec.yaml index 74fe71ac736..afa6105d417 100644 --- a/packages/animations/pubspec.yaml +++ b/packages/animations/pubspec.yaml @@ -2,7 +2,7 @@ name: animations description: Fancy pre-built animations that can easily be integrated into any Flutter application. repository: https://github.com/flutter/packages/tree/main/packages/animations issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+animations%22 -version: 2.1.0 +version: 2.1.1 environment: sdk: ^3.7.0 From 286ed7660a4fc25408ed5abd1b0619d88b7f0c21 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Tue, 11 Nov 2025 18:36:11 +0000 Subject: [PATCH 2/2] [animations] More explicit dartdoc from Gemini Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- packages/animations/lib/src/open_container.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/animations/lib/src/open_container.dart b/packages/animations/lib/src/open_container.dart index b1cd117d99f..9b4e8e17f68 100644 --- a/packages/animations/lib/src/open_container.dart +++ b/packages/animations/lib/src/open_container.dart @@ -190,8 +190,8 @@ class OpenContainer extends StatefulWidget { /// * [Material.shape], which is used to implement this property. final ShapeBorder openShape; - /// Called when the container was popped and is about to transition back to - /// the closed state. + /// Called when the container is popped. This is called at the start of the + /// closing transition. /// /// The return value from the popped screen is passed to this function as an /// argument.