v3.2.0
timezone_to_country
Extension method for translation Time Zone Id to ISO 3166-1 alpha-2 code (e.g. 'Asia/Seoul' to 'KR')
11Likes 64.3K30-day downloads160Pub points
AndroidiOSLinuxmacOSWebWindows
Library for translation Time Zone Id to ISO 3166-1 alpha-2 code (e.g. 'Asia/Seoul' to 'KR')
{"sdk":"flutter"}^0.11.0^5.0.0{"sdk":"flutter"}English project snapshot. Visit GitHub for the latest content.
pub package pub points pub downloads flutter ci
Library for translation Time Zone Id to ISO 3166-1 alpha-2 code (e.g. 'Asia/Seoul' to 'KR')
example
TimeZoneToCountry.getCountryCode('Asia/Seoul') // 'KR'
TimeZoneToCountry.getCountryCode('America/Los_Angeles') // 'US'
TimeZoneToCountry.getCountryCode('Europe/London') // 'GB'
String code = await TimeZoneToCountry.getLocalCountryCode();
print(code); // 'KR'
IANA - Time Zone Database - 2025c