AssetUtil class

资源帮助类

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Properties

imageRoot String
getter/setter pair

Static Methods

image(String? imageName, {double? width, double? height, double? size, BoxFit fit = BoxFit.contain, bool excludeFromSemantics = false, bool gaplessPlayback = false, Color? imageColor, bool primary = false, BuildContext? context}) Widget
传入图片名字获取图片Widget,注意不需要带路径
imagePath(String imageName) String
拼接图片路径
init(String imagePath) → void
raw(String imageName) AssetImage
tapImage(String? imageName, VoidCallback onTap, {double? width, double? height, double? size, BoxFit fit = BoxFit.contain, bool excludeFromSemantics = false, double? paddingH = 0, double? paddingV = 0, bool gaplessPlayback = false, Color? imageColor, bool primary = false, BuildContext? context, bool disabled = false}) Widget