Closed MariosKoni closed 8 months ago
It seems like it has moved into the CountrySelector package, which is used internally by this library:
https://github.com/cedvdb/flutter_country_selector/blob/main/lib/src/localization/localization.dart
imo this should either be documented or an alias should be added to PhoneFieldLocalization
towards CountrySelectorLocalization
It seems like it has moved into the CountrySelector package, which is used internally by this library:
https://github.com/cedvdb/flutter_country_selector/blob/main/lib/src/localization/localization.dart
imo this should either be documented or an alias should be added to
PhoneFieldLocalization
towardsCountrySelectorLocalization
So at the moment, how do we access the localizations?
CountrySelectorLocalization.countryName(your iso code)
. This is from a transitive dependency, I don't think it is necessary to export it from the phone_form_field package. So you might have to install that dependency too if you need to translate countries dynamically.
Explained here:
https://github.com/cedvdb/flutter_country_selector?tab=readme-ov-file#dynamic-localization
I also changed the information in the CHANGELOG so unless there is anything else to do here I'll consider this as fixed.
https://github.com/cedvdb/phone_form_field/blob/main/CHANGELOG.md#900
@cedvdb Could you publish the version 9.2.0 to pub.dev that supports circle_flags: ^5.0.0, since flutter_country_selector also depence on circle_flags: ^5.0.0. Otherwise, I cant use flutter_country_selector with 9.1.0 version of phone_form_field.
thanks for your fast replies. I appreciate it.
It is already there 9.2.1
atm
In the changelog of version 9.0.0, there is a breaking change where you suggest to use
PhoneFieldLocalization.of(context).countryName(isoCode)
instead ofLocalizedCountryRegistry
, but such function is not present (countryName
).