Imager class

Utility class to conveniently create image and transform it

Constructors

Imager()

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 Properties

placeholderPath String?
getter/setter pair

Static Methods

decorationImage(String assetName, {BoxFit fit = BoxFit.cover, Alignment alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat}) DecorationImage
Create a DecorationImage from local assetName
fromFile(File file, {double? width, double? height, Color? color, BoxDecoration? decoration, EdgeInsets? padding, EdgeInsets? margin, bool isCircle = false, BoxFit fit = BoxFit.contain, bool backOffSizing = true, bool enableMirror = false}) Widget
Create an image from file
fromLocal(String assetName, {double? width, double? height, Color? color, BoxDecoration? decoration, EdgeInsets? padding, EdgeInsets? margin, bool isCircle = false, BoxFit fit = BoxFit.contain, bool backOffSizing = true, bool enableMirror = false}) Widget
Create an image from assetName of your local assets
fromMemory(Uint8List bytes, {double? width, double? height, Color? color, BoxDecoration? decoration, EdgeInsets? padding, EdgeInsets? margin, bool isCircle = false, BoxFit fit = BoxFit.contain, bool backOffSizing = true, bool enableMirror = false}) Widget
Create an image from memory with bytes
fromNetwork(String? url, {double? width, double? height, Color? color, BoxDecoration? decoration, EdgeInsets? padding, EdgeInsets? margin, String? placeholder, bool showPlaceholder = true, bool isCircle = false, BoxFit fit = BoxFit.contain, BoxFit placeholderFit = BoxFit.contain, bool backOffSizing = true, bool enableMirror = false}) Widget
Fetch the image from url, cache it and load into a proper widget