Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 2.5Found to occur in 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6Found to occur in 2.6frameworkflutter/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/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Steps to Reproduce
- Run this Code:
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Flutter Demo',
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<String> items = List.generate(5, (index) => 'Tile $index');
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: ReorderableListView.builder(
buildDefaultDragHandles: false,
itemBuilder: (context, index) {
return ListTile(
trailing: ReorderableDragStartListener(
index: index,
child: const Icon(Icons.drag_indicator),
),
key: Key('$index'),
title: Text(items[index]),
);
},
itemCount: items.length,
onReorder: (int oldIndex, int newIndex) {
setState(() {
if (oldIndex < newIndex) {
newIndex -= 1;
}
final item = items.removeAt(oldIndex);
items.insert(newIndex, item);
});
}));
}
}Expected results:
It should behave like all the children.
Actual results:
R.mp4
The Issue is not platform-specific.
Details
Analyzing reorderablelistview_bug...
No issues found! (ran in 1.5s)
[✓] Flutter (Channel stable, 2.5.0, on Ubuntu 21.04 5.11.0-16-generic, locale en_IN)
• Flutter version 2.5.0 at /home/mayank/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4cc385b4b8 (3 weeks ago), 2021-09-07 23:01:49 -0700
• Engine revision f0826da7ef
• Dart version 2.14.0
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /home/mayank/Android/Sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /usr/local/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• Ubuntu clang version 12.0.0-3ubuntu1~21.04.1
• cmake version 3.18.4
• ninja version 1.10.1
• pkg-config version 0.29.2
[✓] Android Studio (version 2020.3)
• Android Studio at /usr/local/android-studio
• Flutter plugin version 60.1.2
• Dart plugin version 203.8292
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] VS Code (version 1.60.2)
• VS Code at /usr/share/code
• Flutter extension version 3.26.0
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Ubuntu 21.04 5.11.0-16-generic
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63
• No issues found!
Reacted by Valentin Vignal, olof-dev, Luccas Clezar, Deepanshu, Albert Bolush, Dainius Masevičius, Matheus H. Baumgarten, dvoloshyn, Johnny Baloney, aryobarzan and 30 more
Reacted by Raşit Ayaz
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 2.5Found to occur in 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6Found to occur in 2.6frameworkflutter/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/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Activity
danagbemava-nc commentedon Sep 28, 2021
Issue is reproducible on
stableandmaster.See attached video.
flutter doctor -v
video
RPReplay_Final1632824488.MP4
HansMuller commentedon Sep 29, 2021
CC @darrenaustin
olof-dev commentedon May 24, 2022
This can be seen in the sample code in the docs. Drag the second-to-last item below the bottom item, and then (without having dropped it) back to its original position. The animation is then incorrect: the dragged item starts moving down like it was going to the bottom, even though it should just drop back into its original position.
olof-dev commentedon May 24, 2022
This seems to be caused by the
- 1inwidget.itemCount - 1in:flutter/packages/flutter/lib/src/widgets/reorderable_list.dart
Lines 733 to 739 in fb57da5
Either that's the issue, or there is something else funky going on with the logic in this sliver:
onReordercallback is not called, due to theoldIndexandnewIndexmatching.onReorderis called witholdIndexbeing the original index andnewIndexbeing the original index + 1. (cf theonReordercode in the sample code in the docs, which doesnewIndex -= 1ifoldIndex < newIndex.)I'm not sure if there's a reason behind this different-newIndex-depending-on-whether-up-or-down behavior, but it's either that that's the problem, or it's the
- 1in_dragEnd.chaudharydeepanshu commentedon Oct 25, 2022
Hey, over a year after it was reported, we're still having this problem:
Therefore, kindly inform us when this will be fixed.
And, if at all possible, please offer any temporary workarounds.
Thank you.
Albertbol commentedon Dec 17, 2022
Hey, same issue.
Any update?
olof-dev commentedon Dec 18, 2022
@chaudharydeepanshu @Albertbol Make sure to thumbs-up the original issue (ie the top post here), as the Flutter team uses that to help guide what to prioritize.
28 remaining items
Fix ReorderableList proxy animation when returning to original position
Refactor ReorderableList _dragEnd to use final index positioning
Add integration test for ReorderableList proxy animation direction bug
Refactor ReorderableList _dragEnd to use final index positioning
Refactor ReorderableList _dragEnd to use final index positioning
frankpape commentedon Aug 1, 2025
@lukemmtt You're the MVP for digging into this enough to figure out the root issue, and to work through those options with tests!
Fix `ReorderableList` proxy animation for partial drag-back (#172380)
Fix `ReorderableList` proxy animation for partial drag-back (flutter#…
github-actions commentedon Aug 25, 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.Fix `ReorderableList` proxy animation for partial drag-back (flutter#…
Fix `ReorderableList` proxy animation for partial drag-back (flutter#…
Fix `ReorderableList` proxy animation for partial drag-back (flutter#…