Flutter package support draw canvas shapes pub package

Support shapes

  1. Rectangle
  2. Circle
  3. Line
  4. Arrow
  5. Chat bubble
  6. Custom shape by extend AbstractShape

Getting started

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

Usage

I will provide specific examples later.

Board(
    children: [
        RectangleShape(
            borderColor: Colors.red,
            location: const Offset(5, 5),
            size: const Size(30, 50),
            color: Colors.orange,
        ),
        CircleShape(
            borderColor: Colors.red,
            location: const Offset(50, 5),
            size: const Size(30, 50),
            color: Colors.orange,
            text: 'Hello'
        ),
        color: Colors.grey,
        size: const Size(1280, 720),
    ],
)

Libraries

magic_canvas
painter/board_painter
painter/painter
shape/abstract_shape
shape/arrow_shape
shape/chat_bubble_shape
shape/circle_shape
shape/image_shape
shape/line_shape
shape/rectangle_shape
This file contains the implementation of the RectangleShape class, which is a subclass of AbstractShape. It represents a rectangular shape with customizable properties such as border color and border radius. The class provides methods to draw the shape on a canvas, including highlighting, decorating, and handling interactive points. It also defines the positions and behaviors of resize and remove points for the shape.
shape/shape
shape/text_box_shape
utils/extension
utils/utils
widget/board
widget/widget