Closed Dan-ru closed 1 month ago
Thank you for the report. I can reproduce this on Linux app as well. The issue doesn't occur on Web or macOS app target.
I noticed the issue doesn't happen if I remove ListView
from Drawer's child. So I narrowed this down with a sample code where I replaced ListView
with sample code below and the issue appears as well. Looks like the issue is caused by AnimatedContainer
as I don't see it appearing when removing it from Column's children. Labeling this issue for other's thoughts.
I bisected this to https://github.com/flutter/flutter/commit/8e418d18185697e56024ef3d5784afba4ac96370. Perhaps it is https://github.com/flutter/engine/pull/50754?
Thank you for bisecting this regression @huycozy! Relabelled to the engine team to see what they think.
Probably the same as https://github.com/flutter/flutter/issues/148653 which I am currently investigating.
Confirmed this issue is the same as https://github.com/flutter/flutter/issues/148653 and fixed in https://github.com/flutter/engine/pull/53103
Thank you for fixing this!
Issue still not fixed. Tried with Flutter 3.22.2
@Dan-ru CP request https://github.com/flutter/engine/pull/53183 has not merged yet so this is not available on hotfix release. But you can try it on master channel.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Steps to reproduce
Just run sample code in debug or release mode, then open/close drawer.
But it will work correctly in debug mode if debugShowCheckedModeBanner is set to "true".
With Flutter 3.19.6 it works correctly.
Expected results
Normal work without artifacts and flickering
Actual results
Artifacts and flickering while opening/closing drawer.
Code sample
Code sample
```dart import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return const MaterialApp( title: 'Flutter Demo', debugShowCheckedModeBanner: false, // <------------------------------ !!! home: MyHomePage(), ); } } class MyHomePage extends StatelessWidget { const MyHomePage({super.key}); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text("Flutter 3.22.0"), ), drawer: Drawer( child: ListView( children: const [ DrawerHeader( child: UserAccountsDrawerHeader( accountName: Text("User"), accountEmail: Text("user@mail.com"), ), ), ], ), ), body: const Center( child: Text('Body'), ), ); } } ```Screenshots or Video
Screenshots / Video demonstration
[20240518_151746.webm](https://github.com/flutter/flutter/assets/24814858/1e402ee5-ce77-4586-82db-080b8c622c80)Logs
Logs
``` flutter --verbose run -d linux [ +21 ms] executing: uname -m [ +13 ms] Exit code 0 from: uname -m [ ] x86_64 [ +97 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update. [ +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +68 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update. [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +110 ms] Skipping pub get: version match. [ +211 ms] Generating /home/user/PROJECT/test_drawer/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java [ +128 ms] No packages with native assets. Skipping native assets compilation. [ +5 ms] Initializing file store [ +12 ms] Skipping target: gen_localizations [ +6 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /home/user/PROJECT/test_drawer/.dart_tool/package_config_subset} [ +66 ms] gen_dart_plugin_registrant: Complete [ +1 ms] Skipping target: _composite [ +2 ms] complete [ +11 ms] Launching lib/main.dart on Linux in debug mode... [ +10 ms] /home/user/flutter_3.22.0/bin/cache/dart-sdk/bin/dartaotruntime --disable-dart-dev /home/user/flutter_3.22.0/bin/cache/dart-sdk/bin/snapshots/frontend_server_aot.dart.snapshot --sdk-root /home/user/flutter_3.22.0/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --experimental-emit-debug-metadata -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/f6344b75dcf861d8bf1f1322780b8811f982e31a/ --output-dill /tmp/flutter_tools.NCFIZJ/flutter_tool.JKHUPV/app.dill --packages /home/user/PROJECT/test_drawer/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build/1bcac9131f185b5e8bd0f600f6ffecf8.cache.dill.track.dill --verbosity=error --enable-experiment=alternative-invalidation-strategy [ +44 ms] Building Linux application... [ +13 ms] <- compile package:test_drawer/main.dart [ +3 ms] executing: [build/linux/x64/debug/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DFLUTTER_TARGET_PLATFORM=linux-x64 /home/user/PROJECT/test_drawer/linux [ +83 ms] -- Configuring done (0.1s) [ +7 ms] -- Generating done (0.0s) [ +17 ms] -- Build files have been written to: /home/user/PROJECT/test_drawer/build/linux/x64/debug [ +9 ms] executing: ninja -C build/linux/x64/debug install [ +10 ms] ninja: Entering directory `build/linux/x64/debug' [+4583 ms] [1/5] Generating /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/libflutter_linux_gtk.so, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_engine.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_method_call.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_method_response.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_value.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/fl_view.h, /home/user/PROJECT/test_drawer/linux/flutter/ephemeral/flutter_linux/flutter_linux.h, _phony_ [ +3 ms] [ +12 ms] executing: uname -m [ ] [ +10 ms] Exit code 0 from: uname -m [ ] [ ] x86_64 [ ] [ +39 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] [ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update. [ ] [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] [ +93 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] [ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] [ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ ] [ +27 ms] Initializing file store [ ] [ +17 ms] Done initializing file store [ ] [ +54 ms] Skipping target: native_assets [ ] [ +1 ms] Skipping target: gen_localizations [ ] [ +1 ms] Skipping target: gen_dart_plugin_registrant [ ] [ +645 ms] Skipping target: unpack_linux [ ] [ +440 ms] kernel_snapshot: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /home/user/PROJECT/test_drawer/lib/main.dart} [ +1 ms] [ +5 ms] Embedding native assets mapping /home/user/PROJECT/test_drawer/.dart_tool/flutter_build/71ae3bbde46214377e4b3ad6dae248ca/native_assets.yaml in kernel. [ +2 ms] [ +7 ms] /home/user/flutter_3.22.0/bin/cache/dart-sdk/bin/dartaotruntime --disable-dart-dev /home/user/flutter_3.22.0/bin/cache/dart-sdk/bin/snapshots/frontend_server_aot.dart.snapshot --sdk-root /home/user/flutter_3.22.0/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/f6344b75dcf861d8bf1f1322780b8811f982e31a/ -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --packages /home/user/PROJECT/test_drawer/.dart_tool/package_config.json --output-dill /home/user/PROJECT/test_drawer/.dart_tool/flutter_build/71ae3bbde46214377e4b3ad6dae248ca/app.dill --depfile /home/user/PROJECT/test_drawer/.dart_tool/flutter_build/71ae3bbde46214377e4b3ad6dae248ca/kernel_snapshot.d --incremental --initialize-from-dill /home/user/PROJECT/test_drawer/.dart_tool/flutter_build/71ae3bbde46214377e4b3ad6dae248ca/app.dill --native-assets /home/user/PROJECT/test_drawer/.dart_tool/flutter_build/71ae3bbde46214377e4b3ad6dae248ca/native_assets.yaml --verbosity=error package:test_drawer/main.dart [ ] [+1121 ms] kernel_snapshot: Complete [ ] [ +602 ms] debug_bundle_linux-x64_assets: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /home/user/PROJECT/test_drawer/.dart_tool/flutter_build/71ae3bbde46214377e4b3ad6dae248ca/app.dill} [ ] [ +173 ms] shaderc command: [/home/user/flutter_3.22.0/bin/cache/artifacts/engine/linux-x64/impellerc, --sksl, --runtime-stage-gles, --runtime-stage-vulkan, --iplr, --sl=/home/user/PROJECT/test_drawer/build/flutter_assets/shaders/ink_sparkle.frag, --spirv=/home/user/PROJECT/test_drawer/build/flutter_assets/shaders/ink_sparkle.frag.spirv, --input=/home/user/flutter_3.22.0/packages/flutter/lib/src/material/shaders/ink_sparkle.frag, --input-type=frag, --include=/home/user/flutter_3.22.0/packages/flutter/lib/src/material/shaders, --include=/home/user/flutter_3.22.0/bin/cache/artifacts/engine/linux-x64/shader_lib] [ ] [ +560 ms] debug_bundle_linux-x64_assets: Complete [ ] [ +302 ms] Persisting file store [ ] [ +7 ms] Done persisting file store [ ] [ +5 ms] build succeeded. [ ] [ +8 ms] "flutter assemble" took 4 087ms. [ ] [ +4 ms] Running 0 shutdown hooks [ ] [ ] Shutdown hooks complete [ ] [ ] exiting with code 0 [ +432 ms] [2/5] Building CXX object CMakeFiles/test_drawer.dir/flutter/generated_plugin_registrant.cc.o [ +40 ms] [3/5] Building CXX object CMakeFiles/test_drawer.dir/my_application.cc.o [ +149 ms] [4/5] Linking CXX executable intermediates_do_not_run/test_drawer [ ] [4/5] Install the project... [ +19 ms] -- Install configuration: "Debug" [ +22 ms] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/test_drawer [ +8 ms] -- Set non-toolchain portion of runtime path of "/home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/test_drawer" to "$ORIGIN/lib" [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/icudtl.dat [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/lib/libflutter_linux_gtk.so [ +3 ms] -- Up-to-date: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/lib [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/packages [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/packages/cupertino_icons [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/packages/cupertino_icons/assets [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/fonts [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/fonts/MaterialIcons-Regular.otf [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/shaders [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/shaders/ink_sparkle.frag [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/AssetManifest.json [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/AssetManifest.bin [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/FontManifest.json [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/version.json [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/NOTICES.Z [ ] -- Installing: /home/user/PROJECT/test_drawer/build/linux/x64/debug/bundle/data/flutter_assets/kernel_blob.bin [ +13 ms] Building Linux application... (completed in 5,4s) [ +3 ms] ✓ Built build/linux/x64/debug/bundle/test_drawer [ +418 ms] VM Service URL on device: http://127.0.0.1:44933/zCkwJq2rw0I=/ [ +4 ms] Caching compiled dill [ +64 ms] Connecting to service protocol: http://127.0.0.1:44933/zCkwJq2rw0I=/ [ +130 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:44933/zCkwJq2rw0I=/. [ +80 ms] DDS is listening at http://127.0.0.1:44855/TapM2ZP07qI=/. [ +50 ms] Successfully connected to service protocol: http://127.0.0.1:44933/zCkwJq2rw0I=/ [ +31 ms] DevFS: Creating new filesystem on the device (null) [ +16 ms] DevFS: Created new filesystem on the device (file:///tmp/test_drawerQRTDQV/test_drawer/) [ +1 ms] Updating assets [ +87 ms] Syncing files to device Linux... [ +1 ms] Compiling dart to kernel with 0 updated files [ ] Processing bundle. [ ] <- recompile package:test_drawer/main.dart 6ad72aa3-5c77-436d-a22f-2dc79e211c7d [ ] <- 6ad72aa3-5c77-436d-a22f-2dc79e211c7d [ +1 ms] Bundle processing done. [ +59 ms] Updating files. [ ] DevFS: Sync finished [ ] Syncing files to device Linux... (completed in 64ms) [ ] Synced 0.0MB. [ ] <- accept [ +2 ms] Connected to _flutterView/0x129e680. [ +1 ms] Flutter run key commands. [ ] r Hot reload. 🔥🔥🔥 [ ] R Hot restart. [ ] h List all available interactive commands. [ ] d Detach (terminate "flutter run" but leave application running). [ ] c Clear the screen [ ] q Quit (terminate the application on the device). [ ] A Dart VM Service on Linux is available at: http://127.0.0.1:44855/TapM2ZP07qI=/ [ +242 ms] The Flutter DevTools debugger and profiler on Linux is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:44855/TapM2ZP07qI=/ ```Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v): ``` [✓] Flutter (Channel stable, 3.22.0, on Fedora Linux 40 (KDE Plasma) 6.8.9-300.fc40.x86_64, locale ru_RU.UTF-8) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Chrome - develop for the web [✓] Linux toolchain - develop for Linux desktop [✓] Android Studio (version 2023.3) [✓] VS Code (version 1.89.1) [✓] Connected device (2 available) [✓] Network resources • No issues found! ```