パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v6.4.0

signature

カスタムスタイル、境界、初期状態を設定できるパフォーマンス最適化された署名キャンバスを提供するFlutterプラグインです。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
37.4万
いいね数
663
Pub ポイント
160

パッケージをインストール

flutter pub add signature

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

署名パッケージは、デジタル署名をキャプチャするための高パフォーマンスなキャンバスを提供するFlutterプラグインです。カスタマイズ可能なスタイル、境界制約、初期状態の構成をサポートしており、フォームや認証ワークフローに最適です。クロスプラットフォーム対応で、Android、iOS、Web、macOS、Windows、Linuxでスムーズに動作します。最小限のレイテンシで滑らかな描画を実現し、設定可能なオプションにより外観と挙動の柔軟性を提供します。

用途

  • デジタル署名の収集
  • 署名検証付きのフォーム送信
  • 認証ワークフロー
  • 電子署名の統合
  • ユーザーIDの検証

主な機能

  • カスタマイズ可能なストロークスタイルと色
  • 署名領域の境界制限
  • 初期状態のサポート(例:事前に入力された署名)
  • 高パフォーマンスレンダリング
  • クロスプラットフォーム互換性
  • カスタマイズ可能なキャンバスサイズとパディング

適している対象

  • 電子署名機能を必要とするアプリ開発者
  • ユーザー認証が必要なフォーム
  • 描画が必要なモバイルおよびウェブアプリケーション
  • コンプライアンス要件を満たす企業向けアプリ
  • 複数のプラットフォーム向けアプリケーション

注意事項

  • キャンバスのサイズとスケーリングの適切な処理が必要です
  • 署名の真正性を確認するために追加の検証が必要になる場合があります
  • パフォーマンスはデバイスの機能に依存します
  • 基本的な描画に限定;複雑な絵画には向かない
  • 画像データ以外の組み込みエクスポート形式はありません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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

Migration to 5.0.0+

  • This version no longer wraps Signature in Expanded widget if you are using it without specifying dimensions
  • This removes error Incorrect use of ParentDataWidget, see this issue for more information.
  • If you are passing dimensions to widget, you do not have to change anything.
  • If you are using widget without dimensions inside Row, Column or Flex widgets, you have to wrap Signature inside Expanded yourself.
  • If you are using widget without dimensions, but not inside mentioned widgets you do not have change anything and error should dissapear from your logs :)

Usage

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

Example

Take a look at our example project as well: Signature Demo

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

// Initialise a controller. It will contains signature points, stroke width and pen color.
// It will allow you to interact with the widget
final SignatureController _controller = SignatureController(
    penStrokeWidth: 5,
    penColor: Colors.red,
    exportBackgroundColor: Colors.blue,
);

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

// CLEAR CANVAS
_controller.clear();

// EXPORT BYTES AS PNG
// The exported image will be limited to the drawn area
_controller.toPngBytes();

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

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

//EXPORTED POINTS CAN BE USED TO INITIALIZE PREVIOUS CONTROLLER
final SignatureController _controller = SignatureController(points: exportedPoints);

//DONT FORGET TO DISPOSE IT IN THE `dispose()` METHOD OF STATEFUL WIDGETS
@override
void dispose() {
  _controller.dispose();
  super.dispose();
}

Example image

Contribution and Support

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

このパッケージを使用しているプロジェクト