PhoenixTools 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 Methods

colorFromHexString(String? s) → Color
从16进制数字字符串,生成Color,例如EDF0F3
getAssetImage(String assetFilePath, {BoxFit? fit, bool gaplessPlayback = false, String? package}) → Image
assetFilePath assets 资源文件路径 package 访问某个 package 里的资源,这里默认为 'bruno' scale 与所用的 png 资源是 icon_2x.png (scale=2.0),icon_3x.png(scale=3.0)
getAssetImageProvider(String assetFilePath, {String? package}) → ImageProvider<Object>
获取本地 AssetImage assetFilePath assets资源文件路径
getAssetImageWithBandColor(String assetFilePath, {String configId = GLOBAL_CONFIG_ID, String? package}) → Image
将 icon 根据主题色变色后返回
getAssetImageWithColor(String assetFilePath, Color? color, {String? package}) → Image
将 icon 根据传入颜色变后返回
getAssetScaleImage(String assetFilePath, {String? package}) → Image
getAssetSizeImage(String assetFilePath, double w, double h, {Color? color, String? package}) → Image
isEmpty(Object? obj) → bool
判空
textSize(String text, TextStyle style) → Size
根据 TextStyle 计算 text 宽度。