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

dependencies:
  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/README.md

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:


dependencies:
  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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
89
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
90
Learn more about scoring.

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

  • Dart: 2.5.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.2

Platforms

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.

Dependencies

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
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test