Painting Over Image in Flutter

You are currently viewing Painting Over Image in Flutter
Paint Image

Painting Over Image in Flutter

A flutter implementation of painting over image.


Paint Image
Paint Image


  • 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.
See also  Flutter Hello World Application

[Note] Tested and working only on flutter stable channel. Please make sure you are on stable channel of flutter before using the package.

Getting started

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

  image_painter: latest

In your library add the following import:

import 'package:image_painter/image_painter.dart';

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

See also  Flutter ChatGPT API Example

Using the library

Check out the example

Basic usage of the libary:

  • Painting over image from network url.
final _imageKey = GlobalKey<ImagePainterState>();
//Provide controller to the painter."https://sample_image.png",
                  key: _imageKey,scalable: true),

///Export the image:
Uint8List byteArray = await _imageKey.currentState.exportImage();
//Now you use `Uint8List` data and convert it to file.
File imgFile = new File('directoryPath/fileName.png');

For more thorough implementation guide, check the example.

See also  Hijri Date Picker in Flutter


This is developed by yellowQ-software
Download this project from the below link.
You can visit original source page from the below link:

Spread the love

Leave a Reply