MoneyUtil class

价格显示工具类

Money Util.

Constructors

MoneyUtil()

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

changeF2Y(int amount, {MoneyFormat format = MoneyFormat.normal}) String
fen to yuan, format output. 分 转 元, format格式输出.
changeF2YWithUnit(int amount, {MoneyFormat format = MoneyFormat.normal, MoneyUnit unit = MoneyUnit.normal}) String
fen to yuan, format & unit output. 分 转 元, format 与 unit 格式 输出.
changeFStr2YWithUnit(String amountStr, {MoneyFormat format = MoneyFormat.normal, MoneyUnit unit = MoneyUnit.normal}) String
fen str to yuan, format & unit output. 分字符串 转 元, format 与 unit 格式 输出.
changeY2F(Object yuan) int
yuan to fen. 元 转 分,
changeYWithUnit(Object yuan, MoneyUnit unit, {MoneyFormat? format}) String
yuan, format & unit output.(yuan is int,double,str). 元, format 与 unit 格式 输出.
withUnit(String moneyTxt, MoneyUnit unit) String
with unit. 拼接单位. 输出价格

Constants

dollar → const String
yuan → const String
yuanZh → const String