flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.17k stars 27.45k forks source link

Dismissible Widget gets stuck on incomplete dismissal and resets on tap #158073

Open Prince2347X opened 1 day ago

Prince2347X commented 1 day ago

Steps to reproduce

  1. Use the code snippet provided in the code sample below.
  2. Swipe the Dismissible widget left and right a few times.
  3. Observe that the widget gets "stuck" in a partially dismissed state.
  4. Tap anywhere on the screen to reset the widget position.

Expected results

The Dismissible widget should reset smoothly on incomplete dismissal after each swipe without requiring an additional tap.

Actual results

The widget gets stuck, and the rounded clipping behaves unpredictably, resetting only on an external tap. I have attached a video demonstrating the actual behavior.

Code sample

Code sample ```dart class ReminderTile extends StatelessWidget { const ReminderTile({super.key}); @override Widget build(BuildContext context) { return ClipRRect( borderRadius: BorderRadius.circular(80), child: Dismissible( background: const ColoredBox( color: Colors.red, ), secondaryBackground: const ColoredBox( color: Colors.green, ), key: const ValueKey('abcd'), child: ListTile( tileColor: Colors.blue, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(80), ), contentPadding: const EdgeInsets.only(left: 25, right: 10, top: 12, bottom: 12), title: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [ const Text('Text 1'), sizedBoxHeight4, const Text('Text 2'), ], ), ), ), ); } } ```

Screenshots or Video

Screenshots / Video demonstration https://github.com/user-attachments/assets/39db1196-4bcd-420e-bc43-8519b22e3828

Logs

Logs ```console [Paste your logs here] ```

Flutter Doctor output

Doctor output ```console [√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [Version 10.0.26100.2033], locale en-IN) • Flutter version 3.19.6 on channel stable at C:\Users\princ\fvm\versions\3.19.6 • Upstream repository https://github.com/flutter/flutter.git • Framework revision 54e66469a9 (7 months ago), 2024-04-17 13:08:03 -0700 • Engine revision c4cd48e186 • Dart version 3.3.4 • DevTools version 2.31.1 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at C:\Users\princ\AppData\Local\Android\sdk • Platform android-34, build-tools 34.0.0 • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.11.5) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools • Visual Studio Build Tools 2022 version 17.11.35327.3 • Windows 10 SDK version 10.0.22621.0 [√] Android Studio (version 2024.2) • Android Studio at C:\Program Files\Android\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.3+-12282718-b509.11) [√] VS Code (version 1.95.1) • VS Code at C:\Users\princ\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.100.0 [√] Connected device (4 available) • M2103K19PI (mobile) • 177.10.10.0:11291 • android-arm64 • Android 13 (API 33) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26100.2033] • Chrome (web) • chrome • web-javascript • Google Chrome 130.0.6723.92 • Edge (web) • edge • web-javascript • Microsoft Edge 130.0.2849.56 [√] Network resources • All expected network resources are available. • No issues found! ```
darshankawar commented 17 hours ago

@Prince2347X Can you upgrade to latest stable and re-run your scenario to check if you still get the same behavior or not ?