A simple Flutter app that shows current time by city and lets you switch locations.
- Load default city time on startup.
- Choose from multiple world locations.
- Show city name, local time, and day/night background.
- Correct timezone handling using API UTC time + offset .
- Flutter
- Dart
httppackage for API callsintlpackage for time formattingflutter_spinkitfor loading animation
This app fetches timezone data from:
https://time.now/developer/api/timezone/{timezone}
Example timezone values:
Europe/BerlinEurope/AthensAsia/Jakarta
lib/
main.dart
pages/
loading.dart
home.dart
choose_location.dart
services/
word_time.dart
- Install Flutter SDK.
- From project root, install packages:
flutter pub get- Run the app:
flutter run- Location switching works by returning selected city data from
choose_location.darttohome.dart. - Time is calculated in
word_time.dartfromutc_datetimewithraw_offset + dst_offsetto ensure each location shows the correct local wall time.