MXImage class
----------------------------------------------------------------------图片组件 width 图片宽度 height 图片高度 color 图片背景颜色 netUrl 网络图片地址 file 文件格式的图片 assetsUrl 本地图片地址 errorWidget 图片加载错误的组件 loadingWidget 图片加载中的组件默认存在骨架屏 customRadius 图片自定义圆角只在roundSquare生效 modeEnum 图片展示的模式cut(裁切模式,图片大小超出容器大小只展示容器大小部分)/ cover(调整图片内容的大小以覆盖其容器)/circle(圆形图片fit依然是cover) fitWidth(根据图片宽度自适应高度) fitHeight(根据图片高度自适应宽度)/roundSquare(圆角图片)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MXImage
Constructors
-
MXImage({Key? key, double width = 72, double height = 72, Color? color, String? netUrl, File? file, String? assetsUrl, Widget? errorWidget, Widget? loadingWidget, ImageProvider<
Object> ? image, ImageFrameBuilder? frameBuilder, ImageLoadingBuilder? loadingBuilder, ImageErrorWidgetBuilder? errorWidgetBuilder, String? semanticLabel, bool excludeFromSemantics = false, Animation<double> ? opacity, BlendMode? colorBlendMode, Alignment alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, Rect? centerSlice, bool matchTextDirection = false, bool gaplessPlayback = false, bool isAntiAlias = false, FilterQuality filterQuality = FilterQuality.none, int? cacheWidth, int? cacheHeight, MXImageModeEnum modeEnum = MXImageModeEnum.roundSquare, BorderRadiusGeometry? customRadius}) -
const
Properties
- alignment → Alignment
-
final
- assetsUrl → String?
-
final
- cacheHeight → int?
-
final
- cacheWidth → int?
-
final
- centerSlice → Rect?
-
final
- color → Color?
-
final
- colorBlendMode → BlendMode?
-
final
- customRadius → BorderRadiusGeometry?
-
final
- errorWidget → Widget?
-
final
- errorWidgetBuilder → ImageErrorWidgetBuilder?
-
final
- excludeFromSemantics → bool
-
final
- file → File?
-
final
- filterQuality → FilterQuality
-
final
- frameBuilder → ImageFrameBuilder?
-
final
- gaplessPlayback → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
final
-
image
→ ImageProvider<
Object> ? -
以下是fluuter原生的img组件需要的参数
final
- isAntiAlias → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingBuilder → ImageLoadingBuilder?
-
final
- loadingWidget → Widget?
-
final
- matchTextDirection → bool
-
final
- modeEnum → MXImageModeEnum
-
final
- netUrl → String?
-
final
-
opacity
→ Animation<
double> ? -
final
- repeat → ImageRepeat
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
final
- width → double
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< MXImage> -
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.
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, int wrapWidth = 65}) → 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