toArabicNumerals property

String get toArabicNumerals

Convert to Arabic-Indic numerals

Implementation

String get toArabicNumerals {
  const arabicNumerals = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'];
  return toString().split('').map((digit) {
    final digitInt = int.tryParse(digit);
    return digitInt != null ? arabicNumerals[digitInt] : digit;
  }).join();
}