toPrice method
String?
toPrice(
- int amount, {
- MoneyFormats format = MoneyFormats.NORMAL,
- MoneyUnit unit = MoneyUnit.NORMAL,
转为金额字符串
Implementation
String? toPrice(
int amount, {
MoneyFormats format = MoneyFormats.NORMAL,
MoneyUnit unit = MoneyUnit.NORMAL,
}) {
if (this == null) {
return null;
}
return MoneyUtil.changeF2YWithUnit(
this!.toInt(),
format: format,
unit: unit,
);
}