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

GitHub リポジトリManfredM/pencil_field

pencil_field

ManfredM/pencil_field open-source repository details.

pencil_field のプロジェクト画像
スター
9
フォーク
3
最終プッシュ(UTC)
2026/03/10
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

FLUTTER PENCIL FIELD

pencil_field

Widget for pencil / stylus input on different devices and platforms. This widget is intended for any freehand input like signatures or drawings.

example


How to use

Just create PencilField widget and embedd it into your page:

PencilField(
  controller: widget.controller,
  pencilPaint: pencilPaint,
  onPencilDrawingChanged: widget.onPencilDrawingChanged,
  decoration: PencilDecoration(
    type: PencilDecorationType.chequered,
    backgroundColor: Colors.white,
    patternColor: Colors.grey[300]!,
    numberOfLines: 10,
    strokeWidth: 2,
    padding: const EdgeInsets.all(10),
  ),
  pencilOnly: true,
)

And resulting input can be displayed like so. As everything is stored in vector format scaling (e.g. for creating previews) is easy:

PencilDisplay(
  pencilDrawing: widget.controller.drawing.scale(
    scale: scale,
  ),
  decoration: PencilDecoration(backgroundColor: Colors.white),
)

Features


PencilField / PencilFieldController

The actual widget that provides the capability to capture and store freehand / pencil input. Each PencilField requires a controller that builds the bridge between the widget and PencilDrawing that stores the input.

PencilDrawing

PencilDrawing stores the actual content captured by PencilField. You can store and retrieve this data in a versioned format, so that future version of PencilField can load old data.

Example

A full example is provided. This example shows how to use PencilField and its litte sibling PencilDisplay. It also shows how to define pens for input and interactions like erase, undo and clear.

Upcoming features

  • Additional eraser that only erases strokes within a circle
  • Pan support for the input widget and the display widget
  • Pinch support for the display widget
  • Input widget decoration that supports images as background
Manfred Mueller GitHub avatar
GitHub 作者

Manfred Mueller ↗

言語DartC++CMakeRubyHTMLCSwiftShellKotlinObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 3 件

  • flutter{"sdk":"flutter"}
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^5.0.0

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗