image_painter 0.1.0 copy "image_painter: ^0.1.0" to clipboard
image_painter: ^0.1.0 copied to clipboard

outdated

A flutter package for drawing over images.

image_painter #

A flutter implementation of painting over image.

OverView #

image

Features #

  • Seven available paint modes. Line, Box/Rectangle, Circle, Freestyle/Signature, Dotted Line, Arrow and Text.
  • Four constructors for adding image from Network Url, Asset Image, Image from file and From memory.
  • Controls from constructors like strokeWidth and Colors.
  • Export image as memory bytes which can be converted to image. [implementation provided on example]
  • Ability to undo and clear drawings.

Getting started #

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  image_painter:

In your library add the following import:

import 'package:image_painter/image_painter.dart';

For help getting started with Flutter, view the online documentation.

Using the library #

Check out the example

Basic usage of the libary:

  • ImagePainter.network: Painting over url from network.
//initialize the controller
Controller imageController = Controller();
//provide controller to the painter.
ImagePainter.asset("https://sample_image.png",
                  key: _imageKey, controller: imageController, scalable: true),
//To change color, strokewidth or paint mode: 
setState((){
    imageController.color = Colors.red;
    imageController.mode = PaintMode.Arrow;
    imageController.strokeWidth = 10.0;
})
193
likes
0
pub points
94%
popularity

Publisher

unverified uploader

A flutter package for drawing over images.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on image_painter