Skip to content

folaoluwafemi/flutter_drawio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d82495b · Jun 2, 2023

History

38 Commits
Mar 15, 2023
Jun 1, 2023
Jun 1, 2023
Mar 15, 2023
Mar 15, 2023
Jun 1, 2023
Apr 15, 2023
Apr 15, 2023
Jun 1, 2023
Jun 2, 2023
Apr 15, 2023
Jun 1, 2023

Repository files navigation

flutter_drawio

A flutter package for drawing on a canvas with an api provided for serialization and deserialization of the drawn data.

Features

  • Sketch scribbles
  • Draw shapes (rectangle, circle, triangle, star)
  • erasing
  • supports erase by area or drawing
  • serialization and deserialization of drawn data
flutter_drawio_example.mov

Getting started

Add it to your pubspec.yaml file under dependencies like so:

dependencies:
  flutter_drawio: ^1.1.0

or use commandline

flutter pub add flutter_drawio

then import it in your dart file

import 'package:flutter_drawio/flutter_drawio.dart';

Usage

final DrawingController controller = DrawingController();

@override
void dispose() {
  //don't forget to dispose the controller
  controller.dispose();
  super.dispose();
}

@override
Widget build(BuildContext context) {
  return Scaffold(
    body: DrawingCanvas(
      //required param
      size: Size(
        MediaQuery
            .of(context)
            .size
            .width * 0.9,
        MediaQuery
            .of(context)
            .size
            .height * 0.9,
      ),
      controller: controller,
    ),
  );
}

Additional information

To create issues, prs or otherwise contribute in anyway see contribution guide . See our roadmap here

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published