flutter_timezone
5.1.1, released 7 weeks ago by wolverinebeach.net
A flutter plugin for getting the local timezone of the device.
What it does
Provides a simple mechanism to fetch the local timezone of the device's operating system. On supported platforms, it returns timezone information containing both the timezone name and localized timezone name.
AI-written summary of version 5.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to know the user's local timezone for date and time calculations.
- You are building a cross-platform Flutter app supporting Android, iOS, web, Windows, macOS, or Linux.
Skip it when
- You require complex timezone database management or conversions that are handled by dedicated timezone libraries without needing system lookups.
Strengths
- Supports multiple platforms including Android, iOS, web, Windows, macOS, and Linux.
- Provides localized timezone names on Android, macOS, and iOS.
Weaknesses
- Localized timezone names are only supported on a subset of platforms.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Install the package and use it directly. Specific platforms like Android may require minimum Java versions as noted in breaking changes.
final TimezoneInfo currentTimeZone = await FlutterTimezone.getLocalTimezone();Alternatives
Packages that do the same job and could replace flutter_timezone.
- flutter_time_guard
Detects and validates device clock changes using NTP
65Compare - mobile_device_identifier
Provides a persistent unique device identifier for Android and iOS.
74Compare - time_change_detector
Detects device time, date, and timezone changes on Android and iOS.
37Compare
Works with
Packages commonly used together with flutter_timezone: ones it builds on, ones built on it, and its own family.
- equatableflutter_timezone depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- timezone_to_countryBuilt on flutter_timezoneTranslate IANA time‑zone IDs to ISO 3166‑1 alpha‑2 country codes.
- nylo_supportBuilt on flutter_timezoneSupport library for the Nylo framework offering routing, networking, storage, widgets and more.
- koolbase_flutterBuilt on flutter_timezoneFlutter SDK for Koolbase BaaS providing auth, database, storage, realtime and OTA updates.
- magicBuilt on flutter_timezoneFull‑stack Flutter framework offering Laravel‑style models, auth, routing, realtime and payments across all platforms.
- firebase_messaging_handlerBuilt on flutter_timezoneUnified Firebase Cloud Messaging handler with inbox, scheduling, and in‑app messaging for Flutter
- carp_mobile_sensingBuilt on flutter_timezoneMobile sensing framework for collecting sensor and device data via configurable probes.