num/num_intl_format_extensions library
Locale-aware number formatting via intl's CLDR data — an opt-in module
that pulls the intl dependency, mirroring date_time_intl_display_extensions.dart.
The rest of lib/num/ formats numbers manually (see num_locale_utils.dart's
formatNumberLocale, which inserts caller-supplied separator strings every
three digits with NO locale data). These extensions exist because a manual
separator-insertion cannot know that fr_FR groups with U+202F (a NARROW
no-break space), that de_DE swaps ./,, or that en_IN groups in a
##,##,##0 (2-2-3) pattern. intl carries the CLDR tables that encode all of
that, and accepts arbitrary ICU number patterns the manual helper cannot
express. None of the logic is domain-specific; it operates on any num.
Extensions
- NumIntlFormatExtensions on num
-
Locale-aware number formatting backed by
intl's CLDR number-symbol data.