flutter_list_drag_and_drop 0.1.3

  • README.md
  • Example
  • Installing
  • Versions
  • new65


A new Flutter package which handles all aspects of drag and drop inside a listView.

In your pubspec.yaml

  flutter_list_drag_and_drop: "^0.1.2"


The code is currently going thorugh some changes and a cleanup


Demo 1

More gifs coming soon..


  • When dragging an item to the top/ bottom the list scroll accordingly
  • Works with different sized items
  • material like behaviour

How to use

Coming soon..

What's coming next

  • Smoother animations
  • Support for horizontal lists

If you encounter feel free to open an issue. Pull request are also welcome.


import 'package:flutter/material.dart';
import 'package:flutter_list_drag_and_drop/drag_and_drop_list.dart';

void main() {
  runApp(new TestApp());

class TestApp extends StatelessWidget {
  TestApp({Key key});

  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
          primarySwatch: Colors.blue, primaryColor: new Color(0xffd05c6b)),
      home: new MyHomePage(
        title: 'Flutter Demo Home Page',
        key: key,

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  MyHomePageState createState() => new MyHomePageState();

class MyHomePageState extends State<MyHomePage> {
  List<String> items = [
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text(widget.title),
      body: new DragAndDropList<String>(
        itemBuilder: (BuildContext context, item) {
          return new SizedBox(
            child: new Card(
              child: new ListTile(
                title: new Text(item),
        onDragFinish: (before, after) {
          String data = items[before];
          items.insert(after, data);
        canBeDraggedTo: (one, two) => true,
        dragElevation: 8.0,

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_list_drag_and_drop: "^0.1.3"

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

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';
Version Uploaded Documentation Archive
0.1.3 May 7, 2018 Go to the documentation of flutter_list_drag_and_drop 0.1.3 Download flutter_list_drag_and_drop 0.1.3 archive
0.1.2 May 1, 2018 Go to the documentation of flutter_list_drag_and_drop 0.1.2 Download flutter_list_drag_and_drop 0.1.2 archive
0.1.1 Apr 26, 2018 Go to the documentation of flutter_list_drag_and_drop 0.1.1 Download flutter_list_drag_and_drop 0.1.1 archive
0.1.0 Apr 26, 2018 Go to the documentation of flutter_list_drag_and_drop 0.1.0 Download flutter_list_drag_and_drop 0.1.0 archive


We analyzed this package on May 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.54.0
  • pana: 0.10.6
  • Flutter: 0.4.4


Describes how popular the package is relative to other packages. [more]
38 / 100
Code health derived from static analysis. [more]
99 / 100
Reflects how tidy and up-to-date the package is. [more]
80 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.


  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 5 hints.

    Run flutter format to format lib/drag_and_drop_list.dart.

    Run flutter format to format lib/my_draggable.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
cupertino_icons ^0.1.0 0.1.2
flutter 0.0.0
meta ^1.1.2 1.1.5
Transitive dependencies
collection 1.14.6 1.14.9
sky_engine 0.0.99
typed_data 1.1.5
vector_math 2.0.6 2.0.7
Dev dependencies