localeDecimalSeparator static method
Returns the default decimal separator for the current platform locale.
This uses locale data from intl, so it handles regional variants like
de_CH, en_ZA, and es_MX.
Note 1: this reflects the default separator for the locale. It may not reflect OS-level number-format overrides.
Note 2: this may return a separator other than , or . for some locales, such as Arabic locales.
Implementation
static String localeDecimalSeparator() {
final locale = ui.PlatformDispatcher.instance.locale;
final localeName = _intlLocaleName(locale);
return NumberFormat.decimalPattern(localeName).symbols.DECIMAL_SEP;
}