changeYWithUnit static method
yuan, format & unit output.(yuan is int,double,str). 元, format 与 unit 格式 输出.
Implementation
static String changeYWithUnit(Object yuan, MoneyUnit unit,
{MoneyFormat? format}) {
String yuanTxt = yuan.toString();
if (format != null) {
int amount = changeY2F(yuan);
yuanTxt = changeF2Y(amount.toInt(), format: format);
}
return withUnit(yuanTxt, unit);
}