whiteboardkit 0.1.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 62

whiteboardkit #

A Flutter whiteboard widget with so much extendability and flexibility to be used with no need to rewrite your own whiteboard. Enjoy !

Package demo

Installation #

Add the following to pubspec.yaml

dependencies:
  ...
  whiteboardkit: ^0.1.6

Usage Example #

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

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

example/README.md

example #

A new Flutter application.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  whiteboardkit: ^0.1.6

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:whiteboardkit/whiteboardkit.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
40
Health:
Code health derived from static analysis. [more]
96
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
65
Overall:
Weighted score of the above. [more]
62
Learn more about scoring.

We analyzed this package on Dec 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.13.1+4
  • Flutter: 1.12.13+hotfix.2

Health suggestions

Fix lib/whiteboard_draw.dart. (-1.49 points)

Analysis of lib/whiteboard_draw.dart reported 3 hints:

line 1 col 8: Unused import: 'dart:convert'.

line 115 col 14: The declaration '_offsetsFromList' isn't referenced.

line 118 col 20: The declaration '_offsetsToList' isn't referenced.

Fix lib/animated_sketch_controller.dart. (-1 points)

Analysis of lib/animated_sketch_controller.dart reported 2 hints:

line 2 col 8: Unused import: 'dart:math'.

line 16 col 8: The value of the field '_skip' isn't used.

Fix lib/gesture_whiteboard_controller.dart. (-0.50 points)

Analysis of lib/gesture_whiteboard_controller.dart reported 1 hint:

line 61 col 21: The target expression uses '?.', so its value can be null.

Fix additional 5 files with analysis or formatting issues. (-1 points)

Additional issues in the following files:

  • lib/sketch_player.dart (1 hint)
  • lib/whiteboard_controller.dart (1 hint)
  • lib/generated/i18n.dart (Run flutter format to format lib/generated/i18n.dart.)
  • lib/whiteboard.dart (Run flutter format to format lib/whiteboard.dart.)
  • lib/whiteboardkit.dart (Run flutter format to format lib/whiteboardkit.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (json_annotation).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
flutter 0.0.0
font_awesome_flutter ^8.4.0 8.5.0
json_annotation ^2.0.0 2.4.0 3.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test