ExtendedImage class

extended image base on official

Inheritance
Implementers

Constructors

ExtendedImage({Key? key, required ImageProvider<Object> image, String? semanticLabel, bool excludeFromSemantics = false, double? width, double? height, Color? color, Animation<double>? opacity, BlendMode? colorBlendMode, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, Rect? centerSlice, bool matchTextDirection = false, bool gaplessPlayback = false, FilterQuality filterQuality = FilterQuality.low, LoadStateChanged? loadStateChanged, BoxBorder? border, BoxShape? shape, BorderRadius? borderRadius, Clip clipBehavior = Clip.antiAlias, bool enableLoadState = false, BeforePaintImage? beforePaintImage, AfterPaintImage? afterPaintImage, ExtendedImageMode mode = ExtendedImageMode.none, bool enableMemoryCache = true, bool clearMemoryCacheIfFailed = true, DoubleTap? onDoubleTap, InitGestureConfigHandler? initGestureConfigHandler, bool enableSlideOutPage = false, BoxConstraints? constraints, Key? extendedImageEditorKey, InitEditorConfigHandler? initEditorConfigHandler, HeroBuilderForSlidingPage? heroBuilderForSlidingPage, bool clearMemoryCacheWhenDispose = false, Key? extendedImageGestureKey, bool isAntiAlias = false, bool handleLoadingProgress = false, EdgeInsets layoutInsets = EdgeInsets.zero})
ExtendedImage.asset(String name, {Key? key, AssetBundle? bundle, String? semanticLabel, bool excludeFromSemantics = false, double? scale, double? width, double? height, Color? color, Animation<double>? opacity, BlendMode? colorBlendMode, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, Rect? centerSlice, bool matchTextDirection = false, bool gaplessPlayback = false, String? package, FilterQuality filterQuality = FilterQuality.low, LoadStateChanged? loadStateChanged, BoxShape? shape, BoxBorder? border, BorderRadius? borderRadius, Clip clipBehavior = Clip.antiAlias, bool enableLoadState = false, BeforePaintImage? beforePaintImage, AfterPaintImage? afterPaintImage, ExtendedImageMode mode = ExtendedImageMode.none, bool enableMemoryCache = true, bool clearMemoryCacheIfFailed = true, DoubleTap? onDoubleTap, InitGestureConfigHandler? initGestureConfigHandler, bool enableSlideOutPage = false, BoxConstraints? constraints, Key? extendedImageEditorKey, InitEditorConfigHandler? initEditorConfigHandler, HeroBuilderForSlidingPage? heroBuilderForSlidingPage, bool clearMemoryCacheWhenDispose = false, Key? extendedImageGestureKey, int? cacheWidth, int? cacheHeight, bool isAntiAlias = false, double? compressionRatio, int? maxBytes, bool cacheRawData = false, String? imageCacheName, EdgeInsets layoutInsets = EdgeInsets.zero})
Creates a widget that displays an ImageStream obtained from an asset bundle. The key for the image is given by the name argument.
ExtendedImage.file(File file, {Key? key, double scale = 1.0, String? semanticLabel, bool excludeFromSemantics = false, double? width, double? height, Color? color, Animation<double>? opacity, BlendMode? colorBlendMode, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, Rect? centerSlice, bool matchTextDirection = false, bool gaplessPlayback = false, FilterQuality filterQuality = FilterQuality.low, LoadStateChanged? loadStateChanged, BoxShape? shape, BoxBorder? border, BorderRadius? borderRadius, Clip clipBehavior = Clip.antiAlias, bool enableLoadState = false, BeforePaintImage? beforePaintImage, AfterPaintImage? afterPaintImage, ExtendedImageMode mode = ExtendedImageMode.none, bool enableMemoryCache = true, bool clearMemoryCacheIfFailed = true, DoubleTap? onDoubleTap, InitGestureConfigHandler? initGestureConfigHandler, bool enableSlideOutPage = false, BoxConstraints? constraints, Key? extendedImageEditorKey, InitEditorConfigHandler? initEditorConfigHandler, HeroBuilderForSlidingPage? heroBuilderForSlidingPage, bool clearMemoryCacheWhenDispose = false, Key? extendedImageGestureKey, int? cacheWidth, int? cacheHeight, bool isAntiAlias = false, double? compressionRatio, int? maxBytes, bool cacheRawData = false, String? imageCacheName, EdgeInsets layoutInsets = EdgeInsets.zero})
Creates a widget that displays an ImageStream obtained from a File.
ExtendedImage.memory(Uint8List bytes, {Key? key, double scale = 1.0, String? semanticLabel, bool excludeFromSemantics = false, double? width, double? height, Color? color, Animation<double>? opacity, BlendMode? colorBlendMode, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, Rect? centerSlice, bool matchTextDirection = false, bool gaplessPlayback = false, FilterQuality filterQuality = FilterQuality.low, LoadStateChanged? loadStateChanged, BoxShape? shape, BoxBorder? border, BorderRadius? borderRadius, Clip clipBehavior = Clip.antiAlias, bool enableLoadState = false, BeforePaintImage? beforePaintImage, AfterPaintImage? afterPaintImage, ExtendedImageMode mode = ExtendedImageMode.none, bool enableMemoryCache = true, bool clearMemoryCacheIfFailed = true, DoubleTap? onDoubleTap, InitGestureConfigHandler? initGestureConfigHandler, bool enableSlideOutPage = false, BoxConstraints? constraints, Key? extendedImageEditorKey, InitEditorConfigHandler? initEditorConfigHandler, HeroBuilderForSlidingPage? heroBuilderForSlidingPage, bool clearMemoryCacheWhenDispose = false, Key? extendedImageGestureKey, int? cacheWidth, int? cacheHeight, bool isAntiAlias = false, double? compressionRatio, int? maxBytes, bool cacheRawData = false, String? imageCacheName, EdgeInsets layoutInsets = EdgeInsets.zero})
Creates a widget that displays an ImageStream obtained from a Uint8List.
ExtendedImage.network(String url, {Key? key, String? semanticLabel, bool excludeFromSemantics = false, double? width, double? height, Color? color, Animation<double>? opacity, BlendMode? colorBlendMode, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, Rect? centerSlice, bool matchTextDirection = false, bool gaplessPlayback = false, FilterQuality filterQuality = FilterQuality.low, LoadStateChanged? loadStateChanged, BoxShape? shape, BoxBorder? border, BorderRadius? borderRadius, Clip clipBehavior = Clip.antiAlias, bool enableLoadState = true, BeforePaintImage? beforePaintImage, AfterPaintImage? afterPaintImage, ExtendedImageMode mode = ExtendedImageMode.none, bool enableMemoryCache = true, bool clearMemoryCacheIfFailed = true, DoubleTap? onDoubleTap, InitGestureConfigHandler? initGestureConfigHandler, bool enableSlideOutPage = false, BoxConstraints? constraints, CancellationToken? cancelToken, int retries = 3, Duration? timeLimit, Map<String, String>? headers, bool cache = true, double scale = 1.0, Duration timeRetry = const Duration(milliseconds: 100), Key? extendedImageEditorKey, InitEditorConfigHandler? initEditorConfigHandler, HeroBuilderForSlidingPage? heroBuilderForSlidingPage, bool clearMemoryCacheWhenDispose = false, bool handleLoadingProgress = false, Key? extendedImageGestureKey, int? cacheWidth, int? cacheHeight, bool isAntiAlias = false, String? cacheKey, bool printError = true, double? compressionRatio, int? maxBytes, bool cacheRawData = false, String? imageCacheName, Duration? cacheMaxAge, EdgeInsets layoutInsets = EdgeInsets.zero})

Properties

afterPaintImage AfterPaintImage?
you can paint anything if you want after paint image. it's to used in ExtendedRawImage and ExtendedRenderImage
final
alignment AlignmentGeometry
How to align the image within its bounds.
final
beforePaintImage BeforePaintImage?
you can paint anything if you want before paint image. it's to used in ExtendedRawImage and ExtendedRenderImage
final
border BoxBorder?
A border to draw above the background color, gradient, or image.
final
borderRadius BorderRadius?
If non-null, the corners of this box are rounded by this BorderRadius.
final
centerSlice Rect?
The center slice for a nine-patch image.
final
clearMemoryCacheIfFailed bool
when failed to load image, whether clear memory cache if true, image will reload in next time.
final
clearMemoryCacheWhenDispose bool
when image is removed from the tree permanently, whether clear memory cache
final
clipBehavior Clip
final
color Color?
If non-null, this color is blended with each image pixel using colorBlendMode.
final
colorBlendMode BlendMode?
Used to combine color with this image.
final
constraints BoxConstraints?
final
enableLoadState bool
whether has loading or failed state default is false but network image is true better to set it's true when your image is big and take some time to ready
final
enableMemoryCache bool
whether cache in PaintingBinding.instance.imageCache
final
enableSlideOutPage bool
whether enable slide out page you should make sure this is in ExtendedImageSlidePage
final
excludeFromSemantics bool
Whether to exclude this image from semantics.
final
extendedImageEditorKey Key?
key of ExtendedImageEditor
final
extendedImageGestureKey Key?
key of ExtendedImageGesture
final
filterQuality FilterQuality
Used to set the FilterQuality of the image.
final
fit BoxFit?
How to inscribe the image into the space allocated during layout.
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
handleLoadingProgress bool
whether handle loading progress for network
final
hashCode int
The hash code for this object.
no setterinherited
height double?
If non-null, require the image to have this height.
final
heroBuilderForSlidingPage HeroBuilderForSlidingPage?
build Hero only for sliding page
final
image ImageProvider<Object>
The image to display.
final
initEditorConfigHandler InitEditorConfigHandler?
init EditConfig when image is ready.
final
initGestureConfigHandler InitGestureConfigHandler?
init GestureConfig when image is ready.
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
layoutInsets EdgeInsets
Insets to apply before laying out the image.
final
loadStateChanged LoadStateChanged?
custom load state widget if you want
final
matchTextDirection bool
Whether to paint the image in the direction of the TextDirection.
final
mode ExtendedImageMode
image mode (none,gesture)
final
onDoubleTap DoubleTap?
call back of double tap under ExtendedImageMode.gesture
final
opacity Animation<double>?
If non-null, the value from the Animation is multiplied with the opacity of each image pixel before painting onto the canvas.
final
repeat ImageRepeat
How to paint any portions of the layout bounds not covered by the image.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
A Semantic description of the image.
final
shape BoxShape?
The shape to fill the background color, gradient, and image into and to cast as the boxShadow.
final
width double?
If non-null, require the image to have this width.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _ExtendedImageState
Creates the mutable state for this widget at a given location in the tree.
override
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.
override
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

Static Properties

globalStateWidgetBuilder Widget Function(BuildContext context, ExtendedImageState state)
default state widget builder
getter/setter pair