added full world clock functionality#876
Open
inderjeet20 wants to merge 1 commit intoCCExtractor:mainfrom
Open
added full world clock functionality#876inderjeet20 wants to merge 1 commit intoCCExtractor:mainfrom
inderjeet20 wants to merge 1 commit intoCCExtractor:mainfrom
Conversation
Contributor
Author
|
@MarkisDev can you please review it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
World Clocks Feature Implementation
fixes #225
Description
Add a comprehensive World Clocks feature to the Ultimate Alarm Clock app, allowing users to track time across multiple global timezones. The feature integrates seamlessly with the existing design, state management, and localization systems.
Changes Overview
Features Added
timezonepackageTechnical Improvements
timezonepackage (0.9.4) with full IANA timezone databaseFiles Modified
New Files (5)
lib/app/data/models/world_clock_model.dart— Data model with serializationlib/app/modules/worldClock/bindings/world_clock_binding.dart— Dependency injectionlib/app/modules/worldClock/controllers/world_clock_controller.dart— Business logic (timer, time formatting, storage)lib/app/modules/worldClock/views/world_clock_view.dart— Full UI with 4 internal widgetsModified Files (10)
pubspec.yaml— Addedtimezone: ^0.9.4dependencylib/main.dart— Initialize timezone database on app startuplib/app/data/providers/get_storage_provider.dart— AddedreadWorldClocks()/writeWorldClocks()methodslib/app/routes/app_routes.dart— AddedWORLD_CLOCK = '/world-clock'routelib/app/routes/app_pages.dart— RegisteredGetPagefor WorldClockView with bindinglib/app/modules/bottomNavigationBar/bindings/bottom_navigation_bar_binding.dart— Inject WorldClockControllerlib/app/modules/bottomNavigationBar/controllers/bottom_navigation_bar_controller.dart— Added WorldClockView to pages list (index 3)lib/app/modules/bottomNavigationBar/views/bottom_navigation_bar_view.dart— Added 4th nav item with globe iconlib/app/utils/language.dart— Added translation keys (English)lib/app/utils/languages/{german,french,russian,spanish}_translations.dart— Added translations for all 5 languagesNew Translation Keys
All 5 language files updated with:
'World Clock'— Tab label'Add a world clock'— Dialog title'Search timezones'— Search placeholder'My Location'— Local card label'Remove Clock'— Dialog title for deletionHow to Test
Verification Checklist
Dependencies Added
timezone: ^0.9.4— IANA timezone database and DST-aware time calculationsNotes
DateTime.now()directly (system time); it's not swipe-deletableRowwithExpandedon left (city details + chips) and fixed-width column on right (time), preventing overflowTimer.periodicin controller;tickreactive variable triggers Obx rebuildsBranch
wclockmainordevelopUX