toPrice method

String? toPrice({
  1. MoneyFormats format = MoneyFormats.NORMAL,
  2. MoneyUnit unit = MoneyUnit.NORMAL,
})

转为金额字符串

Implementation

String? toPrice({
  MoneyFormats format = MoneyFormats.NORMAL,
  MoneyUnit unit = MoneyUnit.NORMAL,
}) {
  if (this == null) {
    return null;
  }
  return MoneyUtil.changeF2YWithUnit(
    this!.toInt(),
    format: format,
    unit: unit,
  );
}