Buscar pacotes, repositórios e categorias de apps

Repositório GitHubManfredM/pencil_field

pencil_field

ManfredM/pencil_field open-source repository details.

Capa do projeto pencil_field
Estrelas
9
Forks
3
Último push (UTC)
10 de mar. de 2026
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

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
Autor no GitHub

Manfred Mueller ↗

LinguagensDartC++CMakeRubyHTMLCSwiftShellKotlinObjective-C

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 3 itens

  • flutter{"sdk":"flutter"}
  • flutter_testDesenvolvimento{"sdk":"flutter"}
  • flutter_lintsDesenvolvimento^5.0.0

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

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

GitHub Docs — About repositories ↗