BaseImage class
Inheritance
Available extensions
Constructors
BaseImage (ImageProvider <Object > image , {Key ? key , String ? semanticLabel , bool excludeFromSemantics = false , double ? width , double ? height , Color ? color , Animation <double > ? opacity , BlendMode ? colorBlendMode , BoxFit ? fit = BoxFit.cover , 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 = BoxShape.rectangle , BorderRadius ? borderRadius = const BorderRadius.all(Radius.circular(2)) , 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 })
BaseImage.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 = BoxFit.cover , AlignmentGeometry alignment = Alignment.center , ImageRepeat repeat = ImageRepeat.noRepeat , Rect ? centerSlice , bool matchTextDirection = false , bool gaplessPlayback = false , String ? package , FilterQuality filterQuality = FilterQuality.low , BoxShape ? shape = BoxShape.rectangle , BoxBorder ? border , BorderRadius ? borderRadius = const BorderRadius.all(Radius.circular(2)) , 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 , Widget ? failed , Widget ? loading })
BaseImage.dynamic (dynamic image , {Key ? key , String ? semanticLabel , bool excludeFromSemantics = false , double ? width , double ? height , Color ? color , Animation <double > ? opacity , BlendMode ? colorBlendMode , BoxFit ? fit = BoxFit.cover , AlignmentGeometry alignment = Alignment.center , ImageRepeat repeat = ImageRepeat.noRepeat , Rect ? centerSlice , bool matchTextDirection = false , bool gaplessPlayback = false , FilterQuality filterQuality = FilterQuality.low , BoxBorder ? border , BoxShape ? shape = BoxShape.rectangle , BorderRadius ? borderRadius = const BorderRadius.all(Radius.circular(2)) , 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 , Key ? extendedImageEditorKey , InitEditorConfigHandler ? initEditorConfigHandler , HeroBuilderForSlidingPage ? heroBuilderForSlidingPage , bool clearMemoryCacheWhenDispose = false , Key ? extendedImageGestureKey , bool isAntiAlias = false , bool handleLoadingProgress = false , EdgeInsets layoutInsets = EdgeInsets.zero , Widget ? failed , Widget ? loading , int ? cacheWidth , int ? cacheHeight , double ? compressionRatio , int ? maxBytes , bool cacheRawData = false , String ? imageCacheName , double scale = 1.0 , bool cache = true , int retries = 3 , Duration ? timeLimit , Duration timeRetry = const Duration(milliseconds: 100) , CancellationToken ? cancelToken , String ? cacheKey , bool printError = true , Duration ? cacheMaxAge , AssetBundle ? bundle , String ? package })
BaseImage.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 = BoxFit.cover , AlignmentGeometry alignment = Alignment.center , ImageRepeat repeat = ImageRepeat.noRepeat , Rect ? centerSlice , bool matchTextDirection = false , bool gaplessPlayback = false , FilterQuality filterQuality = FilterQuality.low , BoxShape ? shape = BoxShape.rectangle , BoxBorder ? border , BorderRadius ? borderRadius = const BorderRadius.all(Radius.circular(2)) , 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 , Widget ? failed , Widget ? loading })
BaseImage.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 = BoxFit.cover , AlignmentGeometry alignment = Alignment.center , ImageRepeat repeat = ImageRepeat.noRepeat , Rect ? centerSlice , bool matchTextDirection = false , bool gaplessPlayback = false , FilterQuality filterQuality = FilterQuality.low , BoxShape ? shape = BoxShape.rectangle , BoxBorder ? border , BorderRadius ? borderRadius = const BorderRadius.all(Radius.circular(2)) , 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 , Widget ? failed , Widget ? loading })
BaseImage.network (String ? url , {Key ? key , String ? semanticLabel , bool excludeFromSemantics = false , double ? width , double ? height , Color ? color , Animation <double > ? opacity , BlendMode ? colorBlendMode , BoxFit ? fit = BoxFit.cover , AlignmentGeometry alignment = Alignment.center , ImageRepeat repeat = ImageRepeat.noRepeat , Rect ? centerSlice , bool matchTextDirection = false , bool gaplessPlayback = false , FilterQuality filterQuality = FilterQuality.low , BoxShape ? shape = BoxShape.rectangle , BoxBorder ? border , BorderRadius ? borderRadius = const BorderRadius.all(Radius.circular(2)) , 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 , 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 , Widget ? failed , Widget ? loading })
Properties
afterPaintImage
→ AfterPaintImage ?
you can paint anything if you want after paint image.
it's to used in ExtendedRawImage
and ExtendedRenderImage
final inherited
alignment
→ AlignmentGeometry
How to align the image within its bounds.
final inherited
beforePaintImage
→ BeforePaintImage ?
you can paint anything if you want before paint image.
it's to used in ExtendedRawImage
and ExtendedRenderImage
final inherited
border
→ BoxBorder ?
A border to draw above the background color , gradient
, or image .
final inherited
borderRadius
→ BorderRadius ?
If non-null, the corners of this box are rounded by this BorderRadius .
final inherited
centerSlice
→ Rect ?
The center slice for a nine-patch image.
final inherited
clearMemoryCacheIfFailed
→ bool
when failed to load image, whether clear memory cache
if true, image will reload in next time.
final inherited
clearMemoryCacheWhenDispose
→ bool
when image is removed from the tree permanently, whether clear memory cache
final inherited
clipBehavior
→ Clip
final inherited
color
→ Color ?
If non-null, this color is blended with each image pixel using colorBlendMode .
final inherited
colorBlendMode
→ BlendMode ?
Used to combine color with this image.
final inherited
constraints
→ BoxConstraints ?
final inherited
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 inherited
enableMemoryCache
→ bool
whether cache in PaintingBinding.instance.imageCache
final inherited
enableSlideOutPage
→ bool
whether enable slide out page
you should make sure this is in ExtendedImageSlidePage
final inherited
excludeFromSemantics
→ bool
Whether to exclude this image from semantics.
final inherited
extendedImageEditorKey
→ Key ?
key of ExtendedImageEditor
final inherited
extendedImageGestureKey
→ Key ?
key of ExtendedImageGesture
final inherited
filterQuality
→ FilterQuality
Used to set the FilterQuality of the image.
final inherited
fit
→ BoxFit ?
How to inscribe the image into the space allocated during layout.
final inherited
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 inherited
handleLoadingProgress
→ bool
whether handle loading progress for network
final inherited
hashCode
→ int
The hash code for this object.
no setter inherited
height
→ double ?
If non-null, require the image to have this height.
final inherited
heroBuilderForSlidingPage
→ HeroBuilderForSlidingPage ?
build Hero only for sliding page
final inherited
image
→ ImageProvider <Object >
The image to display.
final inherited
initEditorConfigHandler
→ InitEditorConfigHandler ?
init EditConfig when image is ready.
final inherited
initGestureConfigHandler
→ InitGestureConfigHandler ?
init GestureConfig when image is ready.
final inherited
isAntiAlias
→ bool
Whether to paint the image with anti-aliasing.
final inherited
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
layoutInsets
→ EdgeInsets
Insets to apply before laying out the image.
final inherited
loadStateChanged
→ LoadStateChanged ?
custom load state widget if you want
final inherited
matchTextDirection
→ bool
Whether to paint the image in the direction of the TextDirection .
final inherited
mode
→ ExtendedImageMode
image mode (none,gesture)
final inherited
onDoubleTap
→ DoubleTap ?
call back of double tap under ExtendedImageMode.gesture
final inherited
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 inherited
repeat
→ ImageRepeat
How to paint any portions of the layout bounds not covered by the image.
final inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
semanticLabel
→ String ?
A Semantic description of the image.
final inherited
shape
→ BoxShape ?
The shape to fill the background color , gradient
, and image into and
to cast as the boxShadow
.
final inherited
width
→ double ?
If non-null, require the image to have this width.
final inherited