fromDouble method

String fromDouble(
  1. double number
)

Implementation

String fromDouble(double number) {
  final decimal = number.toString().split('.');

  final leftNumber = int.parse(decimal.first);
  final rightNumber = int.parse(decimal.last);

  var textNumber = convertNumberToText(leftNumber);

  if (rightNumber != 0) {
    return "$textNumber ${mapper.pointText} ${convertNumberToText(rightNumber)}";
  }

  return textNumber;
}