The Flutter team has also pushed this feature to the framework, https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/reorderable_list.dart
A new Flutter package which handles all aspects of drag and drop inside a listView.
In your pubspec.yaml
dependencies: flutter_list_drag_and_drop: "^0.1.6"
If you encounter feel free to open an issue. Pull request are also welcome.
A new Flutter example of the list drag& drop.
For help getting started with Flutter, view our online documentation.
Add this to your package's pubspec.yaml file:
dependencies: flutter_list_drag_and_drop: ^0.1.6
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:flutter_list_drag_and_drop/drag_and_drop_list.dart'; import 'package:flutter_list_drag_and_drop/my_draggable.dart';
|0.1.6||Dec 6, 2018|
|0.1.5||Aug 31, 2018|
|0.1.4||Aug 6, 2018|
|0.1.3||May 7, 2018|
|0.1.2||May 1, 2018|
|0.1.1||Apr 26, 2018|
|0.1.0||Apr 26, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Jan 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
lib/drag_and_drop_list.dart. (-1.99 points)
lib/drag_and_drop_list.dart reported 4 hints:
line 191 col 16: The value of the local variable 'end' isn't used.
line 332 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: DraggableListItem.myKey, DraggableListItem.delegate
line 336 col 16: The value of the field '_kScrollThreashhold' isn't used.
line 400 col 38: Name non-constant identifiers using lowerCamelCase.
flutter format to format
CHANGELOG.md. (-20 points)
Changelog entries help clients to follow the progress in your code.