搜索插件、代码仓与 APP 分类

GitHub 代码仓Fasoo-DigitalPage/sketch_flow

草图流程

一个强大且灵活的 Flutter 绘图插件

草图流程 项目封面
星标
12
复刻
2
最近推送(UTC)
2026年6月9日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

Sketch Flow

English / 한국어
A powerful and flexible Flutter sketching plugin
Easily build drawing applications with elegant UI and comprehensive export features.

Features

Easy-to-use SketchController
  • Integrate sketching functionality with just a few lines using SketchController. Manage tools, undo/redo, and export effortlessly.
Export Support
  • PNG: For high-resolution image rendering
  • SVG: For scalable vector graphics
  • JSON: For precise stroke data and replaying paths
Built-in Stylish UI
  • Comes with ready-made top/bottom bars that offer a clean, user-friendly design.
  • Use directly without extra customization for quick prototyping.

Preview

Test it live!: Try it
View example code: main.dart
Check out an example project using sketch_flow: sketch_flow_example

Core components at a glance

Components Description
SketchController (Required) Key controller that manages drawing status and can be extracted in various formats such as JSON/SVG/PNG
SketchBoard (Required) Main canvas widget to handle user input (draw/er, etc.)
SketchTopBar / SketchBottomBar (Optional) Preferred UI components

Architecture

How to Use sketch_flow

Install the package
dependencies:
  sketch_flow: ^latest_version
SketchController and SketchBoard
  • SketchController is a key class that manages drawing data.
    By passing this controller to SketchBoard, you can process user input, extract or reload the information you need.
final SketchController _controller = SketchController();
  • And if you want to extract images with PNG or save the screen, you need to set GlobalKey on SketchBoard.
    This key is internally connected to RepaintBoundary and is used to capture images.
final GlobalKey _repaintKey = GlobalKey();
  • After this definition, pass it along to SketchBoard:
SketchBoard(
  controller: _controller,
  repaintKey: _repaintKey,
)
(Optional) Use SketchTopBar and SketchBottomBar
  • It's easy to use, and you can customize it in your own style through a variety of parameters.
Scaffold(
  appBar: SketchTopBar(controller: _controller),
  body: SketchBoard(controller: _controller),
  bottomNavigationBar: SketchBottomBar(controller: _sketchController),
)

💡 Of course, you can freely configure the UI.
If you connect the Sketch Controller properly, you can design the UI any way you want without the top and bottom bars.

Export & Import Drawings

JSON (Serialization / Deserialization)
  • You can easily serialize (export) your sketch data to JSON and deserialize (import) it back using the controller:
final json = _controller.toJson(); // Serialization

_controller.fromJson(json: json); // Deserialization
PNG
  • You can easily export your drawing as a PNG using SketchController.
    Customize the image resolution with the pixelRatio parameter:
final Uint8List? image = await _controller.extractPNG(
  repaintKey: _repaintKey,
  pixelRatio: 2.0, // Customize resolution
);
SVG
  • Easily export your drawing as an SVG with SketchController.
    You can define the canvas width and height to match your needs.
final String svgCode = await _controller.extractSVG(
  width: 300.0, // Define canvas width
  height: 400.0, // Define canvas height
);

Tools Overview

Tool Type Description
Move Enables panning and zooming of the canvas without affecting the drawings.
Pencil Draws a continuous line based on user input. Configurable stroke thickness, color, and opacity.
Brush Simulates a brush-like stroke with smooth edges. Supports color and thickness customization.
Highlighter Draws semi-transparent strokes resembling a highlighter. Comes with predefined low opacity and medium thickness to simulate real highlighter effects.
Palette Allows users to select colors for drawing tools.
Eraser Erases drawings either by stroke or by area.
Line Draws a straight line between the first and last touch point. Line color and thickness are customizable.
Rectangle Draws a rectangle defined by the first and last touch points.
Circle Draws a circle or ellipse bounded by the first and last touch points.
Fasoo-DigitalPage GitHub avatar
语言DartC++CMakeRubySwiftCHTMLKotlinObjective-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 ↗