ExNum extension
扩展Num
- on
-
- num?
Methods
-
add(
num value) → double? - 加 (精确相加,防止精度丢失). add (without loosing precision).
-
dateFormat(
String pattern, {bool isSecond = false}) → String? - 根据格式将时间戳(Milliseconds)格式化日期
-
divide(
num value) → double? - 除 (精确相除,防止精度丢失). divide (without loosing precision).
-
getTimeDifference(
{bool isShowDay = true, bool isSecond = false}) → String? - 时间戳(Milliseconds)距离当前的时间
-
getTimeDifferenceDescription(
{bool isSecond = false}) → String? - 时间戳(Milliseconds)距离当前的时间描述
-
multiply(
num value) → double? - 乘 (精确相乘,防止精度丢失). multiply (without loosing precision).
-
spacing(
) → Widget - 间距
-
subtract(
num value) → double? - 减 (精确相减,防止精度丢失). subtract (without loosing precision).
-
toDateString(
{bool isSecond = false}) → String? - 将时间戳(Milliseconds)格式化日期
-
toDateTimeString(
{bool isSecond = false}) → String? - 将时间戳(Milliseconds)格式化日期时间
-
toFileSize(
{int decimals = 0}) → String? - 将字节转为容量单位
-
toPrice(
{MoneyFormats format = MoneyFormats.NORMAL, MoneyUnit unit = MoneyUnit.NORMAL}) → String? - 转为金额字符串
-
toTimeString(
{bool isSecond = false}) → String? - 将时间戳(Milliseconds)格式化时间