Painter class Null safety

The Painter class represents the space by which a supplied image can be modified.

Constructors

Painter(Uint8List encodedBytes)
Painter.fromBase64(String encodedImage)
factory
Painter.fromDecodedImage(Image image)
factory
Painter.fromFile(File imageFile)
factory
Painter.fromFilePath(String filePath)
factory
Painter.fromJson(Map<String, dynamic> json)
factory

Properties

content String
final
encodedBytes Uint8List
final
hashCode int
The hash code for this object.
read-only, inherited
height int
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
width int
read-only

Methods

copyCrop(int x, int y, int w, int h) Painter
Crop the underlying image.
drawLine(int x1, int y1, int x2, int y2, Color color, {bool antialias = false, num thickness = 1}) → void
Draw a line on the underlying image.
drawString(int x, int y, String text, {Color color = const Color.rgb(0, 0, 0)}) → void
Draw text on the underlying image.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override
writeAsJpeg(String filePath) Future<void>
Write the image as a jpeg to the specified destination.

Operators

operator ==(Object other) bool
The equality operator.
inherited