FdcFormatSettings.fromLocale constructor

FdcFormatSettings.fromLocale(
  1. Locale locale
)

Creates FDC format settings for the supplied locale.

This uses the curated built-in FDC locale registry when a preset exists and falls back to neutral English-style technical defaults otherwise. It never uses intl and never needs asynchronous locale-data initialization.

Implementation

factory FdcFormatSettings.fromLocale(Locale locale) {
  final preset = _FdcBuiltInLocaleFormats.tryResolve(locale);
  return preset ?? FdcFormatSettings(locale: canonicalLocaleName(locale));
}