ImageView class

Inheritance

Constructors

ImageView.assetImage(String imagePath, {double width, double height, double size, BoxFit fit, Color color})
ImageView.assetSvg(String svgPath, {double width, double height, double size, BoxFit fit: BoxFit.contain, Color color})
ImageView.futureIcon(Future<IconData> iconFuture, {double size, Color color})
ImageView.futureImage(Future<String> imageUrlFuture, {double width, double height, double size, BoxFit fit, Color color, bool useDiskCache: true})
ImageView.futureSvg(Future<String> svgUrlFuture, {double width, double height, BoxFit fit: BoxFit.contain, double size, Color color, bool useDiskCache: true})
ImageView.icon(IconData icon, {double size, Color color})
ImageView.networkImage(String imageUrl, {double width, double height, double size, BoxFit fit, Color color, bool useDiskCache: true, String fallbackAssetImage, Uint8List fallbackImage, LoadingProgress loadingProgress, VoidCallback loadFailedCallback, VoidCallback loadedCallback})
ImageView.networkSvg(String svgUrl, {double width, double height, BoxFit fit: BoxFit.contain, double size, Color color, bool useDiskCache: true})

Properties

color Color
颜色
final
fallbackAssetImage → String
备用的asset image路径
final
fallbackImage → Uint8List
备用的Image
final
fit BoxFit
适应模式
final
height → double
高度 如果同时设置了width, heightsize, 那么优先size
final
icon IconData
icon
final
iconFuture → Future<IconData>
需要异步获取的icon
final
imagePath → String
本地图片路径
final
imageUrl → String
图片url
final
imageUrlFuture → Future<String>
需要异步获取的图片url
final
loadedCallback VoidCallback
加载完成回调
final
loadFailedCallback VoidCallback
加载失败回调
final
loadingProgress LoadingProgress
加载进度回调
final
size → double
大小, 如果同时设置了width, heightsize, 那么优先size
final
svgPath → String
本地svg路径
final
svgUrl → String
svg的url
final
svgUrlFuture → Future<String>
需要异步获取的svg url
final
useDiskCache → bool
是否使用硬盘缓存
final
width → double
宽度 如果同时设置了width, heightsize, 那么优先size
final
hashCode → int
The hash code for this object.
read-only, inherited
key Key
Controls how one widget replaces another widget in the tree.
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

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.
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.debug}) → String
Returns 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 ==(dynamic other) → bool
The equality operator.
inherited