Skip to Content
Mix 2.0 is in development! You can access the Mix 1.0 docs here.

StyledImage

This is equivalent to the Image widget in Flutter.

StyledImage( image: AssetImage('assets/image.jpg'), style: ImageStyler() .width(152) .height(152) .fit(BoxFit.cover), );

Constructor

PropTypeRequired / Default Value
imageImageProvider<Object>?Optional
frameBuilderImageFrameBuilder?Optional
loadingBuilderImageLoadingBuilder?Optional
errorBuilderImageErrorWidgetBuilder?Optional
opacityAnimation<double>?Optional
styleStyle<ImageSpec>Optional, defaults to ImageMix.create()
keyKey?Optional

Style API Reference

Mix provides an extension of Style<ImageSpec> called ImageStyler for easily styling StyledImage widgets.

MethodDescription
animateSets animation configuration
modifierAdds widget modifiers
imageSets the image provider
widthSets image width
heightSets image height
colorSets color overlay for the image
repeatSets how the image should be repeated
fitSets how the image should be fitted within its container
alignmentSets image alignment within its bounds
centerSliceSets center slice for nine-patch effects
filterQualitySets filter quality for image scaling
colorBlendModeSets blend mode for color overlay
semanticLabelSets semantic label for accessibility
excludeFromSemanticsSets whether to exclude from semantics
gaplessPlaybackSets whether to maintain previous image while loading
isAntiAliasSets whether to apply anti-aliasing
matchTextDirectionSets whether image should match text direction