whiteboardkit 0.2.0 whiteboardkit: ^0.2.0 copied to clipboard
An awesome Flutter whiteboard implementation with drawing toolbox.
whiteboardkit #
A Flutter whiteboard widget with so much extendability and flexibility to be used with no need to rewrite your own whiteboard. Enjoy !
live demo: https://abdulaziz-mohammed.github.io/whiteboardkit
Usage #
import whiteboardkit.dart
import 'package:whiteboardkit/whiteboardkit.dart';
define GestureWhiteboardController and listen to change event
GestureWhiteboardController controller;
@override
void initState() {
controller = new GestureWhiteboardController();
controller.onChange().listen((draw){
//do something with it
});
super.initState();
}
place your Whiteboard inside a constrained widget ie. container,Expanded etc
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: Whiteboard(
controller: controller,
),
),
],
),
),
);
}