v3.2.0
timezone_to_country
用於將時區 ID 轉換為 ISO 3166-1 alpha-2 國家代碼的擴展方法(例如 'Asia/Seoul' 轉換為 'KR')
11喜歡 6.4萬近 30 天下載160Pub 分數
AndroidiOSLinuxmacOSWebWindows
用於將時區 ID 轉換為 ISO 3166-1 alpha-2 代碼的函式庫(例如 'Asia/Seoul' 轉換為 'KR')
{"sdk":"flutter"}^0.11.0^5.0.0{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
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