Flutter:Equivalent to NSLocale (iOS) & Locale (Android)

434 views Asked by At

I am trying to get ISOCountryCodes(list) from the phone system. I use NSLocale.isoCountryCodes in iOS native and Locale.getISOCountries() in the case of Android native. I am trying to do a new app in Flutter , was looking for the API for ISOCountries, couldnt find any in documentation.

Does Flutter has a similar API?

2

There are 2 answers

0
anoop4real On BEST ANSWER

I finally ended up in using flutter_country_picker 0.1.1, I used a part of it where you have all the country meta data. Its still predefined data, anyways that was the quickest option.

Here is the source code Country Search Flutter

0
조준영 On

You can get isoCountryCode from sim_info plugin

A Flutter plugin for read SIM information. You can get SIM data for MCC, MNC, country code, etc...

This plugin is available iOS and Android platform