liToYuanStr method
分转元之后格式化 symbol:货币符号 ,isPrefix:货币符号是否在前面(true = $1.0 ,false = 1.0$)
Implementation
String liToYuanStr(
{String? symbol,
NumFormat format = NumFormat.defValue,
bool isPrefix = true}) {
var feeStr = liToYuan().formatStr(format: format);
if (symbol == null || symbol.isEmpty) {
return feeStr;
} else {
return isPrefix ? "$symbol$feeStr" : "$feeStr$symbol";
}
}