v3.2.0
timezone_to_country
用于将时区 ID 转换为 ISO 3166-1 alpha-2 国家代码的扩展方法(例如 'Asia/Seoul' 转换为 'KR')
11喜欢 8.2万近 30 天下载160Pub 分数
AndroidiOSLinuxmacOSWebWindows
用于将时区 ID 转换为 ISO 3166-1 alpha-2 代码的库(例如 'Asia/Seoul' 转换为 'KR')
以下为英文项目原文快照,最新内容请访问 GitHub。
Library for translation Time Zone Id to ISO 3166-1 alpha-2 code (e.g. 'Asia/Seoul' to 'KR')
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
依赖清单 4 项
{"sdk":"flutter"}^0.11.0^5.0.0{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗