ImageUtilFlutter class

Assortment of methods to load, save, share and manipulate images.

Constructors

ImageUtilFlutter()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

compressToJpg(Uint8List pngBytes, double width, double height, {int quality = 100}) Future<Uint8List>
Compresses bytes to JPG.
compressToPng(Uint8List pngBytes, double width, double height, {int quality = 100}) Future<Uint8List>
Compresses bytes to PNG.
compressToWebp(Uint8List pngBytes, double width, double height, [int quality = 100]) Future<Uint8List>
Compresses bytes to WEBP.
getSize(Uint8List bytes) Size
Returns the Size of image bytes.
loadFromCamera({double? widthMax, double? heightMax, int? quality}) Future<Uint8List>
Loads an image using the local camera.
loadFromGallery({double? widthMax, double? heightMax, int? quality}) Future<Uint8List>
Loads an image from the local gallery.
loadFromWeb(dynamic url, {double? widthMax, double? heightMax, int? quality}) Future<Uint8List>
Loads an image from the given url.
rotate(Uint8List bytes, int rotate, {ImageFormat format = ImageFormat.jpeg}) Future<Uint8List>
Rotates and image.
saveAs(Uint8List bytes, String name, {String? album, int quality = 100, Size? size, int? dpi, int rotate = 0, ImageFormat format = ImageFormat.jpeg}) Future<String?>
Web: Downloads the file via Browser.
setDpi(Uint8List imageBytes, int dpi) Future<Uint8List>
Sets the DPI in EXIF.
shareAs(String title, String message, Uint8List bytes, RenderBox? box, {int quality = 100, Size? size, int? dpi, int rotate = 0, ImageFormat format = ImageFormat.jpeg}) Future<void>
Shares an image via Share-dialog.