assortment 0.1.4

  • README.md
  • Installing
  • Versions
  • 70

Assortment

Simple sortable DOM elements in Dart using HTML5 drag and drop

Usage

To use this library in your code :

  • add a dependency in your pubspec.yaml :
dependencies:
  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:


dependencies:
  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

Analysis

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

  • Dart: 2.0.0-dev.46.0
  • pana: 0.10.6

Scores

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

Platforms

Detected platforms: web

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

Suggestions

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

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

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 hint.

    Run dartfmt to format lib/assortment.dart.

Dependencies

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