persistent_canvas 1.0.5+5

Persistent Canvas package for Flutter #

pub package

A Flutter package providing PixelBuffer and PersistentCanvas classes powered by PhotographTransducer.

1.0.3 - May 4, 2019 #

  • Add PersistentCanvasCoordinates


Persistent Canvas Example #

    PersistentCanvas _canvas = PersistentCanvas(
      // [PersistentCanvas] will maintain a [ui.Image] of [Size] 'size'
      size: Size(250, 250),

      // Use "normalized" coordinates spanning [0,1]
      coordinates: PersistentCanvasCoordinates.preNormalized,
    RandomColor _randomColor = RandomColor();
    Random _random = Random();
    int _counter = 0;
    void _incrementCounter() {
      setState(() {
        // Draw a random circle
          Offset(_random.nextDouble(), _random.nextDouble()),
          _random.nextDouble() / 20.0,
          Paint()..color = _randomColor.randomColor(),

Demo #

Use this package as a library

1. Depend on it

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

  persistent_canvas: ^1.0.5+5

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:persistent_canvas/persistent_canvas.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.5.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.2


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Fix lib/photograph_transducer.dart. (-25 points)

Analysis of lib/photograph_transducer.dart failed with 1 error:

line 90 col 23: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.

Format lib/persistent_canvas.dart.

Run flutter format to format lib/persistent_canvas.dart.

Format lib/persistent_canvas_stack.dart.

Run flutter format to format lib/persistent_canvas_stack.dart.

Format lib/pixel_buffer.dart.

Run flutter format to format lib/pixel_buffer.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
busy_model ^1.0.0 1.0.0+0
flutter 0.0.0
image ^2.0.8 2.1.4
scoped_model ^1.0.1 1.0.1
Transitive dependencies
archive 2.0.10
args 1.5.2
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.3
meta 1.1.7
path 1.6.4
petitparser 2.4.0
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
xml 3.5.0