SilImage class

Inheritance

Constructors

SilImage(String? imgPath, {Key? key, double? width, double? height, BoxFit? fit = BoxFit.cover, Widget? placeholder, String? placeholderImgPath, String? errorImgPath, Color? backgroundColor, double? radius, Color? borderColor, BorderRadiusGeometry? borderRadius, double? borderWidth, EdgeInsetsGeometry? margin, AlignmentGeometry? alignment, String? packageName})
const

Properties

alignment AlignmentGeometry?
对齐方式
final
backgroundColor Color?
背景颜色
final
borderColor Color?
边框颜色
final
borderRadius BorderRadiusGeometry?
自定义圆角
final
borderWidth double?
边框宽度
final
decoration BoxDecoration
装饰
no setter
defalutWidget Widget
默认色块,没有背景图时显示
no setter
errorImgPath String?
网络错误时显示,本地图片地址
final
errorWidget Widget
错误图片
no setter
fit BoxFit?
final
hashCode int
The hash code for this object.
no setterinherited
height double?
final
imgPath String?
图片地址,可以传网络图片、本地图片地址,自动判断处理
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
外间距
final
normalPlaceholder Widget
默认占位
no setter
normalPlaceholderPic Widget
默认占位图
no setter
packageName String?
包名
final
placeholder Widget?
final
placeholderImgPath String?
占位图,本地图片地址,没有设置placeholder时,才起作用
final
radius double?
是否要切圆角
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double?
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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}) 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