ImageWidget class

图片加载器 1.通过chflutter -ipg -img-path-gen命令生成所有插件包包含的图片路径去重后生成FlutterImageLists; 2.先从flutter项目查找并加载图片若没有再从native加载;

Inheritance

Constructors

ImageWidget({Key? key, required String urlOrAlias, Color? backgroundColor, double? width, double? height, BoxFit? fit, BorderRadius? borderRadius, String? placeholder, String? placeholderAlias, ImageExtensionData? extensionData, OnBuildImageUrlCall? buildUrlCall, OnBuildFinishedCall? buildFinishedCall})
const

Properties

backgroundColor Color?
背影颜色
final
borderRadius BorderRadius?
圆角大小
final
buildFinishedCall OnBuildFinishedCall?
图片控件构建结束回调
final
buildUrlCall OnBuildImageUrlCall?
构建url回调函数与urlOrAlias互斥
final
extensionData ImageExtensionData?
扩展数据,在buildUrlCall回调参数中返回
final
fit BoxFit?
图片填充类型
final
hashCode int
The hash code for this object.
no setterinherited
height double?
图片高
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
placeholder String?
占位图(flutter assets图片)
final
placeholderAlias String?
占位图图片别名 flutter项目图片:图片名称(xxx.png) native项目图片:图片别名(share_logo_qq.png->shareLogoQq,设置shareLogoQq)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
urlOrAlias String
图片网络地址或别名ImageNamesAlias,与buildUrlCall互斥 eg. urlOrName: "share_logo_qq.png->shareLogoQq"
final
width double?
图片宽
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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