šŸ“Œ zeba_academy_canvas_board

A powerful, fully offline interactive canvas board for Flutter — designed for drawing, note-taking, brainstorming, and building dynamic UI layouts.


šŸš€ Features

✨ Pan & Zoom — Smooth navigation across large canvases ✨ Grid & Snapping — Perfect alignment for diagrams ✨ Interactive Items — Add text, shapes, and widgets ✨ Drag & Move — Intuitive gesture-based positioning ✨ JSON Export/Import — Save and restore canvas state ✨ Image Export — Capture canvas as an image ✨ Fully Offline — No API, no internet required


šŸ“¦ Installation

Add this to your pubspec.yaml:

dependencies:
  zeba_academy_canvas_board: ^0.0.1

šŸ› ļø Usage

import 'package:flutter/material.dart';
import 'package:zeba_academy_canvas_board/zeba_academy_canvas_board.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    final controller = CanvasController();

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text("Canvas Board")),
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            controller.addItem(
              CanvasItem(
                id: DateTime.now().toString(),
                position: const Offset(100, 100),
                type: CanvasItemType.text,
                text: "Hello",
              ),
            );
          },
          child: const Icon(Icons.add),
        ),
        body: CanvasBoard(controller: controller),
      ),
    );
  }
}

🧠 Controller API

Add Item

controller.addItem(item);

Remove Item

controller.removeItem(id);

Export JSON

final json = controller.exportJson();

Import JSON

controller.importJson(json);

šŸ–¼ļø Export as Image

Add dependency:

dependencies:
  screenshot: ^2.1.0

Wrap your canvas:

Screenshot(
  controller: screenshotController,
  child: CanvasBoard(controller: controller),
)

Capture:

final image = await screenshotController.capture();

šŸ“š Use Cases

  • 🧠 Brainstorming boards
  • šŸ“ Study diagrams
  • šŸ“ Visual note-taking
  • šŸŽØ UI prototyping
  • 🧩 Widget layout builders

šŸ”„ Roadmap

  • Undo / Redo
  • Freehand drawing (pen tool)
  • Image widget support
  • Multi-select & grouping
  • Layer system

šŸ“„ License

This project is licensed under the GPL License.


šŸ‘Øā€šŸ’» About Me

✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin


🌐 Your all-in-one no-bloat hub!

šŸš€ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! šŸ’»āœØ

Zeba Academy is a learning platform dedicated to coding, technology, and development. āž” Visit our main site: zeba.academy āž” Explore hands-on courses and resources at: code.zeba.academy āž” Check out our YouTube for more tutorials: zeba.academy āž” Follow us on Instagram: zeba.academy


Thank you for visiting! šŸ™Œ