ImageHelper class

Inheritance

Constructors

ImageHelper({required String image, required ImageType imageType, ImageShape imageShape = ImageShape.none, Color? color, double? height, double? width, BoxFit boxFit = BoxFit.contain, Widget? errorBuilder, FilterQuality filterQuality = FilterQuality.low, Widget? loaderBuilder, BlendMode blendMode = BlendMode.srcIn, Alignment alignment = Alignment.center, double scale = 1.0, BorderRadiusGeometry? borderRadius, Color? defaultLoaderColor, Color? defaultErrorBuilderColor, Curve fadeInAnime = Curves.easeIn, Curve fadeOutAnime = Curves.easeOut, Duration fadeInDuration = const Duration(milliseconds: 300), Duration fadeOutDuration = const Duration(milliseconds: 300), Animation<double>? opacity, ImageRepeat imageRepeat = ImageRepeat.noRepeat, bool excludeFromSemantics = false, Rect? centerSlice, bool gaplessPlayback = false, bool isAntiAlias = false, bool matchTextDirection = false, String? semanticLabel, int? frameRate = 15, BoxBorder? boxBorder})

Properties

alignment Alignment
How to align the image within its bounds.
final
blendMode BlendMode
change image blend mode
final
borderRadius BorderRadiusGeometry?
work only when ImageShape.rectangle If non-null, the corners of this box are rounded by this BorderRadius.
final
boxBorder BoxBorder?
box border surounded image
final
boxFit BoxFit
change image fit into source, default is null
final
centerSlice Rect?
The center slice for a nine-patch image.
final
color Color?
color for change tint image with different color, by default it's null
final
defaultErrorBuilderColor Color?
color for change tint image with different color, by default it's null
final
defaultLoaderColor Color?
color for change tint image with different color, by default it's null
final
errorBuilder Widget?
error and loader Builders have default value in case of null
final
excludeFromSemantics bool
Whether to exclude this image from semantics.
final
fadeInAnime Curve
curve that use to load image with animation, not applied to all type of assetFlag
final
fadeInDuration Duration
duration of loading image, not applied to all type of assetFlag
final
fadeOutAnime Curve
curve that use to load image with animation, not applied to all type of assetFlag
final
fadeOutDuration Duration
duration of loading image, not applied to all type of assetFlag
final
filterQuality FilterQuality
default is low Quality levels for image sampling in ImageFilter and Shader objects that sample assetFlag and for Canvas operations that render assetFlag.
final
frameRate int?
used for gif image frame rate of image loading
final
gaplessPlayback bool
Whether to continue showing the old image (true), or briefly show nothing (false), when the image provider changes. The default value is false.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
image height and width , by default is null
final
image String
image path is the path of the image that will be loaded from
final
imageRepeat ImageRepeat
image repeat for repeat image , default is ImageRepeat.noRepeat
final
imageShape ImageShape
image shape is for define the shape around the image as provided circle , rounded or none
final
imageType ImageType
image type is for provide different image loader with enum type it provide image changes as assetFlag, file, network, or cached
final
isAntiAlias bool
Whether to paint the image with anti-aliasing.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loaderBuilder Widget?
error and loader Builders have default value in case of null
final
matchTextDirection bool
Whether to paint the image in the direction of the TextDirection.
final
memoryImage Widget
no setter
opacity Animation<double>?
opacity animation for image, default is null
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
image scale , default value is 1.0
final
semanticLabel String?
A Semantic description of the image.
final
width double?
image height and width , by default is null
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
dataFromBase64String(String base64String) Uint8List
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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