š 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! š