checkAndFormatDigits function

String checkAndFormatDigits(
  1. String digits
)

Implementation

String checkAndFormatDigits(String digits) {
  digits = digitToEnglish(digits);
  if (int.tryParse(digits) == null) {
    throw Exception('input should only contain `int` value.');
  }
  return digits;
}