signature 2.0.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 93

signature #

pub package

A Flutter plugin providing performance optimized signature canvas with ability to set custom style, boundaries and initial state. This is native flutter implementation, so it supports all platforms.

Why #

In time of creation of this plugin, there was no available solution that had:

  • required performance on wide range of devices
  • ability to set canvas boundaries
  • ability to initialize using previously saved state

Usage #

To use this plugin, add signature as a dependency in your pubspec.yaml file.

Example #

// IMPORT PACKAGE
import 'package:signature/signature.dart';

// INITIALIZE. RESULT IS A WIDGET, SO IT CAN BE DIRECTLY USED IN BUILD METHOD 
var _signatureCanvas = Signature(
  width: 300,
  height: 300,
  backgroundColor: Colors.lightBlueAccent,
);

// CLEAR CANVAS
_signatureCanvas.clear();

// EXPORT BYTES (EXPORTING FORMAT IS PNG)
_signatureCanvas.exportBytes();

// isEmpty/isNotEmpty CAN BE USED TO CHECK IF SIGNATURE HAS BEEN PROVIDED
_signatureCanvas.isNotEmpty; //true if signature has been provided
_signatureCanvas.isEmpty; //true if signature has NOT been provided

// EXPORT POINTS (2D POINTS ROUGHLY REPRESENTING WHAT IS VISIBLE ON CANVAS)
var exportedPoints = _signatureCanvas.exportPoints();

//EXPORTED POINTS CAN BE USED TO INITIALIZE PREVIOUS STATE VIA CONSTRUCTOR
var _signatureCanvas = Signature(
  points: exportedPoints,
  width: 300,
  height: 300,
  backgroundColor: Colors.lightBlueAccent,
);

Contribution and Support #

  • Contributions are welcome!
  • If you want to contribute code please create a PR
  • If you find a bug or want a feature, please fill an issue

2.0.0 #

  • Migration from android.support packages to androidx packages that allows this library to be used with flutter projects that use androidx. If you need to stay on android.support for whatever reason, don't upgrade as it may break your build. See more.

1.1.0 #

  • Fixed breaking change in Picture.toImage in latest flutter
  • New properties isEmpty and isNotEmpty at Signature class for validation purposes

1.0.3 #

  • fixed bug where canvas was not writable in case of specific boundary setup

1.0.2 #

  • removed debug statements and cleanup

1.0.1 #

  • README modifications and code reformat

1.0.0 #

  • Initial release

example/README.md

signature_example #

Demonstrates how to use the signature plugin.

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:
  signature: ^2.0.0

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:signature/signature.dart';
  
Version Uploaded Documentation Archive
2.0.0 Feb 20, 2019 Go to the documentation of signature 2.0.0 Download signature 2.0.0 archive
1.1.0 Feb 20, 2019 Go to the documentation of signature 1.1.0 Download signature 1.1.0 archive
1.0.3 Oct 23, 2018 Go to the documentation of signature 1.0.3 Download signature 1.0.3 archive
1.0.2 Oct 23, 2018 Go to the documentation of signature 1.0.2 Download signature 1.0.2 archive
1.0.1 Oct 23, 2018 Go to the documentation of signature 1.0.1 Download signature 1.0.1 archive
1.0.0 Oct 23, 2018 Go to the documentation of signature 1.0.0 Download signature 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
89
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95
Overall:
Weighted score of the above. [more]
93
Learn more about scoring.

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

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/generated/i18n.dart.

Run flutter format to format lib/generated/i18n.dart.

Maintenance issues and suggestions

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test