Repository navigation
feat(weather): add Android home screen weather widgets - #624
Vinson1014 wants to merge 14 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
CI 檢查未通過:請先 Rebase 至最新的
|
Platform: android New(zh-Hant): Android 桌面新增天氣小工具,可選擇地點並依尺寸顯示即時天氣與預報 New(en-US): add Android home screen weather widgets with location selection and size-adaptive weather and forecasts
Platform: android New(zh-Hant): 首頁天氣更新會同步至 Android 小工具,切換首頁地點不會清除其他小工具的資料 New(en-US): sync Home weather updates to Android widgets without clearing their data when switching Home locations
Platform: android New(zh-Hant): 點擊 Android 天氣小工具可直接開啟 App 首頁 New(en-US): open the app Home screen directly by tapping an Android weather widget
Platform: android Fix(zh-Hant): Android 在粵語、簡體中文及香港繁體中文環境顯示在地化 App 名稱 Fix(en-US): show localized Android app names in Cantonese, Simplified Chinese and Hong Kong Traditional Chinese
Platform: android Fix(zh-Hant): 修正天氣小工具偶爾錯判資料過期與預報時間 Fix(en-US): fix weather widgets occasionally misjudging data freshness and forecast timing
Platform: android Fix(zh-Hant): 避免無效的小工具設定持續觸發背景更新 Fix(en-US): prevent invalid widget configurations from triggering ongoing background updates
Platform: android Fix(zh-Hant): 修正天氣小工具在儲存暫時異常後無法自動恢復更新 Fix(en-US): restore automatic weather widget updates after temporary storage failures
c9769cb to
be10faa
Compare
這個 PR 做了什麼
新增 Android 桌面天氣小工具,使用者可為每個小工具選擇目前位置或已儲存地點,並依小、中、大尺寸顯示即時天氣與預報。
AppWidgetProvider、設定頁、RemoteViews尺寸版型、背景更新與 WorkManager 排程、校時、定位與鄉鎮解析,以及 widget 專用 SQLite 快取與快照排序防護。widget_snapshotchannel 同步首頁天氣與已儲存地點;點擊 widget 可直接開啟 App 首頁。相關 issue
怎麼驗
tool/check/commits.sh origin/main..HEAD:13 個 commits 通過。tool/check.sh:所有 CI gate 通過。tool/dev/test_android.sh::app:testDebugUnitTest通過,0 failures。tool/dev/lint_android.sh::app:lintDebug通過,無 lint error。tool/dev/build.sh android:release APK 建置成功,輸出build/app/outputs/flutter-apk/app-release.apk(86.8 MB)。實機截圖:
檢查清單
tool/check/commits.sh origin/main..HEAD通過—— commit 訊息就是更新日誌,格式見 commit.md
mise exec -- flutter analyze與mise exec -- flutter test通過tool/dev/analyze.sh與tool/check.sh通過—— 專案規範要求透過
tool/腳本使用 pinned Flutter;tool/check.sh已執行 Dart 測試/coverage gate。res/values*/widget_strings.xml,沒有寫死gh pr checks:每一項都是 pass 或 skipped)—— 沒過不能合併,見 pr.md
RemoteViews使用集中於res/values/widget_dimens.xml的尺寸 token;已查看淺色/深色實機截圖,文字對比度可接受。