GridImage class

可附带激活态图片的格子图片;尺寸和偏移同时应用于两个状态。

Inheritance
Annotations

Constructors

GridImage(ImageProvider<Object> image, {LuckyLength? top, LuckyLength? left, LuckyLength? width, LuckyLength? height, LuckyImageFormatter? formatter, double? borderRadius, double opacity = 1, ImageProvider<Object>? fallback, String? semanticLabel, ImageProvider<Object>? activeImage})
创建图片;激活图片未提供或未加载时使用普通图。
const

Properties

activeImage → ImageProvider<Object>?
激活态图片 provider。
final
borderRadius → double?
图片圆角半径(逻辑像素);null 表示无圆角。
finalinherited
fallback → ImageProvider<Object>?
主图片失败时使用的后备 provider。
finalinherited
formatter → LuckyImageFormatter?
首帧解码后的图片转换函数。
finalinherited
hashCode → int
与图片配置相等性一致的哈希值。
no setteroverride
height → LuckyLength?
目标高度;null 按自然尺寸或宽度等比推导。
finalinherited
image → ImageProvider<Object>
主图片 provider。
finalinherited
left → LuckyLength?
水平偏移;null 使用居中位置。
finalinherited
opacity → double
绘制不透明度,调用方应提供 0–1 的值。
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel → String?
图片的无障碍描述。
finalinherited
top → LuckyLength?
顶部偏移;null 按零处理。
finalinherited
width → LuckyLength?
目标宽度;null 按自然尺寸或高度等比推导。
finalinherited

Methods

copyWith({ImageProvider<Object>? image, LuckyLength? top, LuckyLength? left, LuckyLength? width, LuckyLength? height, LuckyImageFormatter? formatter, double? borderRadius, double? opacity, ImageProvider<Object>? fallback, String? semanticLabel, ImageProvider<Object>? activeImage}) → GridImage
返回替换非空参数的副本。
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
按普通和激活图片配置比较。
override