FLUTTER ECOSYSTEM

timezone_to_country

用於將時區 ID 轉換為 ISO 3166-1 alpha-2 國家代碼的擴展方法(例如 'Asia/Seoul' 轉換為 'KR')

最新版本
3.2.0
近 30 天下載
6.4萬
喜歡數
11
Pub 分數
160

Package Overview

根據套件公開資料產生的選型評估,僅供參考。

套件概覽

timezone_to_country 套件提供了一個擴展方法,可將時區識別碼(例如 'Asia/Seoul')轉換為對應的 ISO 3166-1 alpha-2 國家代碼(例如 'KR')。它透過讓開發者能有效率地將時區映射至國家,簡化地理定位邏輯。此套件專為 Flutter 所設計,支援所有主要平台,包含 Android、iOS、Linux、macOS、Web 與 Windows。該套件輕量且專為需要基於時區的國家解析之應用程式所打造。

適用情境
  • 時區轉換為國家代碼
  • 根據時區顯示使用者位置
  • 增強地理位置功能
  • 支援國際化應用設定
  • 從時區資料自動檢測區域
主要特色
  • Simple extension method
  • Supports all Flutter platforms
  • Uses ISO 3166-1 alpha-2 codes
  • Lightweight and easy to integrate
  • Accurate time zone to country mapping
適合對象
  • Apps needing time zone to country conversion
  • Internationalized applications
  • Location-aware services
  • Backend or frontend geolocation utilities
  • Developers seeking minimal dependencies
使用建議
  • 依賴準確的時區資料庫
  • 不處理模糊或自定時區
  • 需要有效的輸入時區 ID
  • 無效輸入沒有執行時錯誤處理
  • 僅限國家代碼輸出
支援平台AndroidiOSLinuxmacOSWebWindows

安裝套件

flutter pub add timezone_to_country

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

相關專案

暫無相關資料。

所在榜單