flutter_signature_pad 0.0.1

  • README.md
  • Example
  • Installing
  • Versions
  • new72

Flutter signature pad widget

Flutter widget to allow users to sign with finger and export the result as image.

Getting Started with Flutter

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

Getting Started with the widget

This is a very simple widget that allow drawing by finger on a widget and be able to get the image back.

For very basic usage, please check the example file here


The constructor of the widget allow you to change the color (default to black) and the strokeWidth (default to 5.0)

clear: allow you to clear the area to start again

getData: allow you to retrieve the image

[0.0.1] - 05/07/2018.

  • Initial release.


import 'dart:convert';
import 'dart:typed_data';
import 'dart:ui' as ui;

import 'package:flutter/material.dart';
import 'package:flutter_signature_pad/flutter_signature_pad.dart';

void main() {

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      home: MyHomePage(title: 'Flutter Demo Home Page'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  ByteData _img = ByteData(0);

  Widget build(BuildContext context) {
    var sign = Signature(
      color: Colors.red,
      strokeWidth: 5.0,
    return Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            children: <Widget>[
              Expanded(child: sign),
                  maxHeight: 200.0,
                  child: Image.memory(_img.buffer.asUint8List())),
                padding: EdgeInsets.all(25.0),
                    Row(mainAxisAlignment: MainAxisAlignment.center, children: [
                      color: Colors.green,
                      onPressed: () async {
                        //retrieve image data, do whatever you want with it (send to server, save locally...)
                        var data = await sign
                            .toByteData(format: ui.ImageByteFormat.png);
                        setState(() {
                          _img = data;
                        debugPrint("onPressed " +
                      child: Text("Save")),
                      color: Colors.grey,
                      onPressed: () {
                      child: Text("Clear")),
        ) // This trailing comma makes auto-formatting nicer for build methods.

Use this package as a library

1. Depend on it

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

  flutter_signature_pad: ^0.0.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_signature_pad/flutter_signature_pad.dart';
Version Uploaded Documentation Archive
0.0.1 Jul 5, 2018 Go to the documentation of flutter_signature_pad 0.0.1 Download flutter_signature_pad 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.0.0-dev.69.0
  • pana: 0.11.7
  • Flutter: 0.5.5


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

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 of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <2.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.6 1.14.11
meta 1.1.5 1.1.6
sky_engine 0.0.99
typed_data 1.1.5 1.1.6
vector_math 2.0.6 2.0.7
Dev dependencies