Repository navigation
Visual bug on the last two items of a ReorderableListView #88331
Description
Activity
- addedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Aug 17, 2021 Hi @Innominus, Issue is reproducible on the latest stable and the master channel.
Code sample
import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); /// This is the main application widget. class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); static const String _title = 'Flutter Code Sample'; @override Widget build(BuildContext context) { return MaterialApp( title: _title, home: Scaffold( appBar: AppBar(title: const Text(_title)), body: const MyStatefulWidget(), ), ); } } /// This is the stateful widget that the main application instantiates. class MyStatefulWidget extends StatefulWidget { const MyStatefulWidget({Key? key}) : super(key: key); @override State<MyStatefulWidget> createState() => _MyStatefulWidgetState(); } /// This is the private State class that goes with MyStatefulWidget. class _MyStatefulWidgetState extends State<MyStatefulWidget> { final List<int> _items = List<int>.generate(50, (int index) => index); @override Widget build(BuildContext context) { final ColorScheme colorScheme = Theme.of(context).colorScheme; final Color oddItemColor = colorScheme.primary.withOpacity(0.05); final Color evenItemColor = colorScheme.primary.withOpacity(0.15); return ReorderableListView( padding: const EdgeInsets.symmetric(horizontal: 40), children: <Widget>[ for (int index = 0; index < _items.length; index++) ListTile( key: Key('$index'), tileColor: _items[index].isOdd ? oddItemColor : evenItemColor, title: Text('Item ${_items[index]}'), ), ], onReorder: (int oldIndex, int newIndex) { setState(() { if (oldIndex < newIndex) { newIndex -= 1; } final int item = _items.removeAt(oldIndex); _items.insert(newIndex, item); }); }, ); } }
Output
Screen.Recording.2021-08-17.at.1.42.27.PM.mov
flutter doctor -v
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-arm, locale en-GB) • Flutter version 2.2.3 at /Users/mahesh/Documents/flutter • Framework revision f4abaa0735 (6 weeks ago), 2021-07-01 12:46:11 -0700 • Engine revision 241c87ad80 • Dart version 2.13.4 [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/mahesh/Library/Android/sdk • Platform android-31, build-tools 31.0.0 • ANDROID_HOME = /Users/mahesh/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.5.1, Build version 12E507 • CocoaPods version 1.10.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.2) • Android Studio at /Applications/Android Studio.app/Contents • 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 11.0.8+10-b944.6916264) [✓] VS Code (version 1.58.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.25.0 [✓] Connected device (4 available) • iPhone 12 Pro Max (mobile) • 5430F628-A903-402C-A635-D55D7E6EEFCA • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 11.5.2 20G95 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.131 • No issues found!
[✓] Flutter (Channel master, 2.5.0-7.0.pre.8, on macOS 11.5.2 20G95 darwin-arm, locale en-GB) • Flutter version 2.5.0-7.0.pre.8 at /Users/mahesh/Documents/flutter_master • Upstream repository https://github.com/flutter/flutter.git • Framework revision 40e8620a27 (7 days ago), 2021-08-06 09:14:50 +0430 • Engine revision 431ac604da • Dart version 2.14.0 (build 2.14.0-383.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/mahesh/Library/Android/sdk • Platform android-31, build-tools 31.0.0 • ANDROID_HOME = /Users/mahesh/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.5.1, Build version 12E507 • CocoaPods version 1.10.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.2) • Android Studio at /Applications/Android Studio.app/Contents • 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 11.0.8+10-b944.6916264) [✓] VS Code (version 1.58.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.25.0 [✓] Connected device (4 available) • iPhone 12 Pro Max (mobile) • 5430F628-A903-402C-A635-D55D7E6EEFCA • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 11.5.2 20G95 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.131 • No issues found!
- addedfound in release: 2.2Found to occur in 2.2Found to occur in 2.2found in release: 2.5Found to occur in 2.5Found to occur in 2.5frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesand removedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Aug 17, 2021 - addedteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
on Jul 8, 2023 For me this happens no matter if you're dragging the second last child or not, just for every child in ReorderableListView
Reacted by Frank Pape and Tong MuI also want to chime in on this, while this bug is purely visual, it can lead to a lot of confusion for users. Has there been any progress?
I am also having the same unexpected issue, and for me just like @remarkked . The issue happens with every item, it is enough to drag to another position but then drag back to original position and drop there.
the issue can be also send in the documentation page https://api.flutter.dev/flutter/material/ReorderableListView-class.html30 remaining items
- added 7 commits that reference this issue
on Jul 28, 2025 - added a commit that references this issue
on Aug 7, 2025 - added a commit that references this issue
on Aug 19, 2025 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 -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Aug 21, 2025 - added a commit that references this issue
on Sep 18, 2025 - added a commit that references this issue
on Sep 22, 2025 - added a commit that references this issue
on Nov 21, 2025
Steps to Reproduce
File below includes the main dart file example:
main.zip
Expected results:
I expected the item I'm dragging to go back into place where I originally held and dragged it from after I dropped it back in its original position
Actual results:
When you drop the item back where you originally dragged it from, the item decides to try and drop in the last position, and then snaps back to its original position
This is actually repeatable without running any code on your machine at all, you can do the same steps above with the example within the Flutter docs:
https://api.flutter.dev/flutter/material/ReorderableListView-class.html
Logs
flutter run --verbose
flutter analyze
flutter doctor -v