time_zone_plus 0.0.1 copy "time_zone_plus: ^0.0.1" to clipboard
time_zone_plus: ^0.0.1 copied to clipboard

retracted

A Flutter package to get timezone names from UTC offsets for current location of User.

time_zone_plus #

A Flutter package to get timezone names from UTC offsets and country codes.

Features #

  • Get timezone name from UTC offset
  • Get current device timezone
  • Get country code from timezone name

Getting started #

Add this to your pubspec.yaml:

dependencies:
  time_zone_plus: ^0.0.1

Usage #

// Initialize timezone database
await TimeZonePlus.initialize();

// Get current timezone
String? timezone = TimeZonePlus.getCurrentTimeZone();
print(timezone); // e.g. 'Asia/Kolkata'

// Get timezone from offset (in minutes)
String? tz = TimeZonePlus.getTimeZoneFromOffset(330); // UTC+5:30
print(tz); // 'Asia/Kolkata'

// Get country code
String? countryCode = TimeZonePlus.getCountryCode('Asia/Kolkata');
print(countryCode); // 'IN'

// Get current country code
String? currentCountry = TimeZonePlus.getCurrentCountryCode();
print(currentCountry); // e.g. 'IN'
6
likes
0
points
10
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to get timezone names from UTC offsets for current location of User.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, timezone

More

Packages that depend on time_zone_plus