stringFromDecimal method

String stringFromDecimal(
  1. Decimal decimal
)

Implementation

String stringFromDecimal(Decimal decimal) {
  String result = _format.format(decimal.toDouble());
  // workaround for https://github.com/dart-lang/intl/issues/376
  if (symbol == '') {
    try {
      int.parse(result[0]);
    } on FormatException {
      result = result.substring(1, result.length);
    }
  }
  return result;
}