assortment 0.1.4

  • Installing
  • Versions
  • 74


Simple sortable DOM elements in Dart using HTML5 drag and drop


To use this library in your code :

  • add a dependency in your pubspec.yaml :
  assortment: ">=0.1.0 <1.0.0"
  • add import in your dart code :
import 'package:assortment/assortment.dart';
  • create an Assortment within an element
var a = new Assortment(querySelector('#sortable-container'));
  • add children to the Assortment
a.addElements(querySelectorAll('#sortable-container .sortable-entry'));
  • rearrange elements by dragging and dropping

  • listen for events to run code during drags

a.onDragEnter.listen((AssortmentEvent event) {
  // update model

1. Depend on it

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

  assortment: "^0.1.4"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:assortment/assortment.dart';
Version Uploaded Documentation Archive
0.1.4 Feb 8, 2017 Go to the documentation of assortment 0.1.4 Download assortment 0.1.4 archive
0.1.3 Feb 24, 2016 Go to the documentation of assortment 0.1.3 Download assortment 0.1.3 archive
0.1.2 Nov 24, 2013 Go to the documentation of assortment 0.1.2 Download assortment 0.1.2 archive
0.1.1 Oct 29, 2013 Go to the documentation of assortment 0.1.1 Download assortment 0.1.1 archive
0.1.0 Oct 29, 2013 Go to the documentation of assortment 0.1.0 Download assortment 0.1.0 archive
0.1.3-dev Feb 24, 2016 Go to the documentation of assortment 0.1.3-dev Download assortment 0.1.3-dev archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
56 / 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]


Detected platforms: web

Primary library: package:assortment/assortment.dart with components: html.


  • Maintain

    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.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use assortment.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=0.8.10+6 <2.0.0