fernan542 / fl_country_code_picker

A Flutter package for showing a modal that contains country dial code. The user can also search for the available codes and select right from the modal.
MIT License
19 stars 34 forks source link

Help Wanted: Problems with German Locale #30

Closed JHarzenetter closed 7 months ago

JHarzenetter commented 7 months ago

I'm running into this issue with the German localisation.

My Root Node looks like this, as mentioned in the Docs.

MaterialApp(
      title: ....,
      supportedLocales: flc.CountryLocalizations.supportedLocales.map(Locale.new),
      localizationsDelegates: const [
        flc.CountryLocalizations.delegate,
      ],
      home: FutureBuilder(...)

My device language is set to german and after the start I get following error message:

======== Exception caught by widgets ===============================================================
The following message was thrown:
Warning: This application's locale, de, is not supported by all of its localization delegates.

• A MaterialLocalizations delegate that supports the de locale was not found.
• A CupertinoLocalizations delegate that supports the de locale was not found.

The declared supported locales for this app are: en, af, am, ar, az, be, bg, bn, bs, ca, cs, da, de, el, es, et, fa, fi, fr, gl, ha, he, hi, hr, hu, hy, id, is, it, ja, ka, kk, km, ko, ku, ky, lt, lv, mk, ml, mn, ms, my, nb, nl, nn, no, pl, ps, pt, ro, ru, sd, sk, sl, so, sq, sr, sv, ta, tg, th, tk, tr, tt, uk, ug, ur, uz, vi, zh

Version of the library: 0.1.9+1

Obviously the locale 'de' can be found in the list but it doesnt work.

If I set the system language to english everything works fine.

Any Ideas?