Skip to content

ic-xu/drawingboard

Repository files navigation

Flutter Drawing Board

A Flutter package of drawing board.

pub package GitHub stars GitHub forks CodeFactor FlutterCandies

现已支持笔触绘制

使用方法

//simple example

import 'package:flutter_drawing_board/drawingboard.dart';

DrawingBoard(
  background: Container(width: 400, height: 400, color: Colors.white),
  showDefaultActions: true,
  showDefaultTools: true,
),
//获取画板数据

import 'package:flutter_drawing_board/drawingboard.dart';

final DrawingController _drawingController = DrawingController();

DrawingBoard(
  controller: _drawingController,
  background: Container(width: 400, height: 400, color: Colors.white),
  showDefaultActions: true,
  showDefaultTools: true,
),

Future<void> _getImageData() async {
  print((await _drawingController.getImageData()).buffer.asInt8List());
}

效果预览

预览网址:https://painter.liugl.cn

Phone

Web

Windows

macOS

Linux

About

drawingboarrd

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published