flutter_list_drag_and_drop 0.1.6

flutter_list_drag_and_drop #

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

  flutter_list_drag_and_drop: "^0.1.6"

Demo #

Demo 1

Features #

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

Take a look at the example folder for info on how to use #

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


example #

A new Flutter example of the list drag& drop.

Getting Started #

For help getting started with Flutter, view our online documentation.

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.6

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub 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';
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]
Learn more about scoring.

We analyzed this package on Nov 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/drag_and_drop_list.dart. (-1.99 points)

Analysis of 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.

Format lib/my_draggable.dart.

Run flutter format to format lib/my_draggable.dart.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <3.0.0
cupertino_icons ^0.1.0 0.1.2
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies