ImageStyle class

Constructors

ImageStyle({double? width, double? height, double? maxWidth, double? maxHeight, double borderRadius = 0, BorderRadiusGeometry? borderRadiusGeometry, BoxBorder? border, List<BoxShadow>? boxShadow, Color? backgroundColor, Color? color, BlendMode? colorBlendMode, ImageFilter? imageFilter, BoxFit fit = BoxFit.cover, Alignment alignment = Alignment.center, ImageRepeat repeat = ImageRepeat.noRepeat, double opacity = 1.0, Clip clipBehavior = Clip.hardEdge, bool isCircle = false, Color? placeholderColor, Color? errorColor})
const

Properties

alignment Alignment
对齐方式(默认:center)
final
backgroundColor Color?
背景色
final
border BoxBorder?
边框
final
borderRadius double
圆角(默认:0)
final
borderRadiusGeometry BorderRadiusGeometry?
圆角配置(优先级高于borderRadius)
final
boxShadow List<BoxShadow>?
阴影
final
clipBehavior Clip
剪裁行为(默认:hardEdge)
final
color Color?
图片颜色(会覆盖图片原有颜色)
final
colorBlendMode BlendMode?
颜色混合模式
final
errorColor Color?
错误图颜色
final
fit BoxFit
填充模式(默认:cover)
final
hashCode int
The hash code for this object.
no setterinherited
height double?
高度(默认:自适应)
final
imageFilter ImageFilter?
滤镜
final
isCircle bool
是否圆形裁剪(优先级高于圆角)
final
maxHeight double?
最大高度
final
maxWidth double?
最大宽度
final
opacity double
透明度(0-1,默认:1)
final
placeholderColor Color?
占位图颜色
final
repeat ImageRepeat
重复模式
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double?
宽度(默认:自适应)
final

Methods

copyWith({double? width, double? height, double? maxWidth, double? maxHeight, double? borderRadius, BorderRadiusGeometry? borderRadiusGeometry, BoxBorder? border, List<BoxShadow>? boxShadow, Color? backgroundColor, Color? color, BlendMode? colorBlendMode, ImageFilter? imageFilter, BoxFit? fit, Alignment? alignment, ImageRepeat? repeat, double? opacity, Clip? clipBehavior, bool? isCircle, Color? placeholderColor, Color? errorColor}) ImageStyle
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
The equality operator.
inherited