whiteboardkit 0.2.2 copy "whiteboardkit: ^0.2.2" to clipboard
whiteboardkit: ^0.2.2 copied to clipboard

An awesome Flutter whiteboard implementation with drawing toolbox.

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  DrawingController controller;

  @override
  void initState() {
    controller = new DrawingController();
    controller.onChange().listen((draw){
      //do something with it
    });
    super.initState();
  }

  @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,
              ),
            ),
          ],
        ),
      ),
    );
  }

  @override
  void dispose() {
    controller.close();
    super.dispose();
  }
}
50
likes
40
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

An awesome Flutter whiteboard implementation with drawing toolbox.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

async, flutter, font_awesome_flutter, json_annotation, synchronized, xml

More

Packages that depend on whiteboardkit