FLUTTER ECOSYSTEM

timezone_to_country

Extension method for translation Time Zone Id to ISO 3166-1 alpha-2 code (e.g. 'Asia/Seoul' to 'KR')

Latest version
3.2.0
30-day downloads
64.3K
Likes
11
Pub points
160

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

The timezone_to_country package provides an extension method to convert time zone identifiers (like 'Asia/Seoul') into their corresponding ISO 3166-1 alpha-2 country codes (like 'KR'). It simplifies geolocation logic by enabling developers to map time zones to countries efficiently. Built for Flutter, it supports all major platforms including Android, iOS, Linux, macOS, Web, and Windows. The package is lightweight and designed for use in apps requiring time zone-based country resolution.

Use cases
  • Converting time zones to country codes
  • Displaying user location based on time zone
  • Enhancing geolocation features
  • Supporting internationalized app settings
  • Automating region detection from time zone data
Key features
  • 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
Suitable for
  • Apps needing time zone to country conversion
  • Internationalized applications
  • Location-aware services
  • Backend or frontend geolocation utilities
  • Developers seeking minimal dependencies
Considerations
  • Relies on accurate time zone database
  • Does not handle ambiguous or custom time zones
  • Requires valid input time zone IDs
  • No runtime error handling for invalid inputs
  • Limited to country code output only
Supported platformsAndroidiOSLinuxmacOSWebWindows

Install package

flutter pub add timezone_to_country

Categories

Dependencies

Dependency list 2 items

Source repository

Related projects

No data available yet.

Rankings