Skip to content

[animations] OpenContainer.onClosed's dartdoc implies it's called after fully closing #178314

@adil192

Description

@adil192

What package does this bug report belong to?

animations

What target platforms are you seeing this bug on?

Android, iOS, Web, macOS, Linux, Windows

Have you already upgraded your packages?

Yes

Dependency versions

pubspec.lock
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  animations:
    dependency: "direct main"
    description:
      name: animations
      sha256: a8031b276f0a7986ac907195f10ca7cd04ecf2a8a566bd6dbe03018a9b02b427
      url: "https://pub.dev"
    source: hosted
    version: "2.1.0"

Steps to reproduce

  1. Hover over the onClosed member of OpenContainer
  2. See Called when the container was popped and has returned to the closed state.
  3. Misinterpret it

Expected results

The dartdoc should say that this function is called at the start of the close transition.

Actual results

I interpreted it to mean this function is called after the close transition has finished.
This caused a bug in my application where I changed the closedBuilder widget before the transition had finished, leading to a content shift issue while animating.
I fixed that bug by delaying the update until after the transition had finished: saber-notes/saber@1a53c4d

Code sample

You can use the example project. This is a documentation issue not a runtime issue.

Screenshots or Videos

No response

Logs

No response

Flutter Doctor output

Doctor output
flutter doctor -v
[✓] Flutter (Channel stable, 3.35.7, on Fedora Linux 43 (COSMIC) 6.17.7-cachyos1.fc43.x86_64, locale en_GB.UTF-8) [23ms]
    • Flutter version 3.35.7 on channel stable at /home/ahann/Documents/Sources/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision adc9010625 (3 weeks ago), 2025-10-21 14:16:03 -0400
    • Engine revision 035316565a
    • Dart version 3.9.2
    • DevTools version 2.48.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [1,512ms]
    • Android SDK at /home/ahann/Android/Sdk
    • Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
    • Platform android-36, build-tools 36.0.0
    • Java binary at: /home/ahann/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.7+-13880790-b1038.58)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [6ms]
    • CHROME_EXECUTABLE = /var/lib/flatpak/app/com.google.Chrome/x86_64/stable/active/export/bin/com.google.Chrome

[✓] Linux toolchain - develop for Linux desktop [229ms]
    • clang version 21.1.4 (Fedora 21.1.4-1.fc43)
    • cmake version 3.31.6
    • ninja version 1.13.1
    • pkg-config version 2.3.0
    • OpenGL core renderer: AMD Radeon RX 9070 XT (radeonsi, gfx1201, LLVM 21.1.2, DRM 3.64, 6.17.7-cachyos1.fc43.x86_64)
    • OpenGL core version: 4.6 (Core Profile) Mesa 25.2.5
    • OpenGL core shading language version: 4.60
    • OpenGL ES renderer: AMD Radeon RX 9070 XT (radeonsi, gfx1201, LLVM 21.1.2, DRM 3.64, 6.17.7-cachyos1.fc43.x86_64)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 25.2.5
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20
    • GL_EXT_framebuffer_blit: yes
    • GL_EXT_texture_format_BGRA8888: yes

[✓] Android Studio (version 2025.1.3) [5ms]
    • Android Studio at /home/ahann/.local/share/JetBrains/Toolbox/apps/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.7+-13880790-b1038.58)

[✓] IntelliJ IDEA Community Edition (version 2025.2) [4ms]
    • IntelliJ at /home/ahann/.local/share/JetBrains/Toolbox/apps/intellij-idea-community-edition
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.102.0) [4ms]
    • VS Code at /usr/share/code
    • Flutter extension version 3.122.0

[✓] Connected device (2 available) [197ms]
    • Linux (desktop) • linux  • linux-x64      • Fedora Linux 43 (COSMIC) 6.17.7-cachyos1.fc43.x86_64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 142.0.7444.134

[✓] Network resources [199ms]
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions