number
library
Functions
-
formatAmount(Decimal? val, {int? precision, bool showSign = false, bool signFirst = false, RoundMode? roundMode, bool enableCompact = true, CompactConverter? compactConverter, bool cutInvalidZero = true, ShrinkZeroMode? shrinkZeroMode, ShrinkZeroConverter? shrinkZeroConverter, ExplicitDirection? direction, String prefix = '', String suffix = '', String? defIfZero, String defIfNull = '--'})
→ String
-
格式化数量
-
formatNumber(Decimal? val, {int? precision, bool showSign = false, bool signFirst = false, RoundMode? roundMode, bool cutInvalidZero = false, bool enableCompact = false, CompactConverter? compactConverter, bool enableGrouping = false, String? groupSepartor, int? groupCounts, ShrinkZeroMode? shrinkZeroMode, ShrinkZeroConverter? shrinkZeroConverter, ExplicitDirection? direction, String prefix = '', String suffix = '', String? defIfZero, String defIfNull = '--'})
→ String
-
-
formatPercentage(Decimal? val, {bool expandHundred = true, int? precision, bool showSign = false, bool signFirst = true, RoundMode roundMode = RoundMode.truncate, bool cutInvalidZero = false, bool enableGrouping = true, ExplicitDirection? direction, bool? percentSignFirst, String prefix = '', String suffix = '', String? defIfZero, String defIfNull = '--'})
→ String
-
百分比
-
formatPrice(Decimal? val, {int? precision, bool showSign = false, bool signFirst = false, RoundMode roundMode = RoundMode.truncate, bool cutInvalidZero = true, bool enableGrouping = true, ShrinkZeroMode? shrinkZeroMode, ShrinkZeroConverter? shrinkZeroConverter, ExplicitDirection? direction, String prefix = '', String suffix = '', String? defIfZero, String defIfNull = '--'})
→ String
-
格式化价钱
-
nonShrinkZeroConverter(dynamic zeroCounts)
→ String
-
不进行零收缩转换器
-
simplifiedChineseCompactConverter(Decimal val)
→ (Decimal, String)
-
简体中文精简转换器 Simplified Chinese compact conversion
-
thousandCompactConverter(Decimal val)
→ (Decimal, String)
-
千分位精简转换器
-
traditionalChineseCompactConverter(Decimal val)
→ (Decimal, String)
-
繁体中文精简转换器 Traditional Chinese compact conversion