Skip to content
pubscout

flutter_drawing_board

1.0.1+2, released 10 months ago by fluttercandies.com

A Flutter widget for interactive drawing with tools, undo/redo, and image export.

WASM-ready
$ flutter pub add flutter_drawing_board
Source repository

What it does

Provides a canvas where users can draw free‑form lines, shapes, and erase. Supports palm‑rejection, history management, JSON serialization and PNG export. The board is highly customizable via a controller and toolbar widgets.

AI-written summary of version 1.0.1+2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need an in‑app drawing surface with basic shapes and brush tools
  • You want to save/load drawings as JSON or export them as images

Skip it when

  • You require text annotations (removed after v0.3.0)
  • You need vector‑based editing or advanced graphic design features

Strengths

  • Rich set of drawing tools and smoothing options
  • Built‑in undo/redo history with configurable limit
  • Performance optimizations like point filtering and canvas caching
  • Easy JSON serialization and PNG export

Weaknesses

  • No built‑in text support
  • Limited to raster output; no vector export
  • Customization may require writing custom content types

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:flutter_drawing_board/flutter_drawing_board.dart';

final controller = DrawingController();

Widget build(BuildContext context) {
  return Scaffold(
    body: Column(
      children: [
        Expanded(child: DrawingBoard(controller: controller, background: Container(color: Colors.white))),
        DrawingBar(controller: controller, tools: [DefaultActionItem.undo(), DefaultActionItem.redo(), DefaultActionItem.clear()]),
        DrawingBar(controller: controller, tools: [DefaultToolItem.pen(), DefaultToolItem.brush(), DefaultToolItem.rectangle()]),
      ],
    ),
  );
}

Alternatives

Packages that do the same job and could replace flutter_drawing_board.

  • barcode

    Barcode generation library for Dart that can generate generic drawing operations for any backend.