MoneyUtil class Null safety

货币工具类

another Fairy

Constructors

MoneyUtil()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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

fenToYuan(int fen, {MoneyFormat format = MoneyFormat.NORMAL, MoneyUnit unit = MoneyUnit.NORMAL}) String
分转元 [...]
fenToYuanByStr(String fenStr, {MoneyFormat format = MoneyFormat.NORMAL, MoneyUnit unit = MoneyUnit.NORMAL}) String
分转元 [...]
yuanToFen(double yuan) int
元转分 [...]
yuanToFenByStr(String yuanStr) int
元转分 [...]
yuanWithSelfUnit(double yuan, String unit, {MoneyFormat? format, bool prefix = true}) String
元拼接单位 [...]
yuanWithUnit(double yuan, {MoneyFormat? format, MoneyUnit unit = MoneyUnit.NORMAL}) String
元拼接单位 [...]

Constants

DOLLAR → const String
'\$'
YUAN → const String
'¥'
YUAN_ZH → const String
'元'