signature_pad 1.0.1

  • README.md
  • Installing
  • Versions
  • 66

signature_pad for Dart

A Pure Dart implementation of Signature Pad by Szymon Nowak

logo

Example

import 'dart:html';
import 'package:signature_pad/signature_pad.dart`

main() {
  var canvas = querySelector("canvas");
  var opts = new SignaturePadOptions(minWidth: 1.5, maxWidth: 4.0, velocityFilterWeight: 0.7);
  var signaturePad = new SignaturePad(canvas, opts);
}

see the example/ directory for a complete example. (e.g. pub serve example)

Demo

The example/ directory contains a Dart version of the JS demo

1. Depend on it

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


dependencies:
  signature_pad: "^1.0.1"

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:signature_pad/signature_pad.dart';
        
Version Uploaded Documentation Archive
1.0.1 May 5, 2017 Go to the documentation of signature_pad 1.0.1 Download signature_pad 1.0.1 archive
1.0.0 May 5, 2017 Go to the documentation of signature_pad 1.0.0 Download signature_pad 1.0.0 archive

Analysis

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

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

Scores

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

Platforms

Detected platforms: web

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

Suggestions

  • Maintain CHANGELOG.md.

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

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 3 errors 1 hint.

    Strong-mode analysis of lib/bezier.dart failed with the following error:

    line: 37 col: 19
    A value of type 'double' can't be assigned to a variable of type 'int'.

    Strong-mode analysis of lib/signature_pad.dart failed with the following error:

    line: 101 col: 22
    The argument type 'Throttler' can't be assigned to the parameter type 'StreamTransformer<MouseEvent, dynamic>'.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use signature_pad.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.22.0
rate_limit ^0.1.0 0.1.0
Dev dependencies
browser ^0.10.0