[Feature/Improvement] Prompt for confirmation when exiting a timer
- 主要語言
- Dart
- 星號
- 114
- 分支
- 24
- PR 合併指標
- 30 天內沒有已合併 PR
描述
**Purpose:** As a user, I would like to be prompted for confirmation when hitting the back button to leave a running timer.
**More details:**
Shown in the screenshot below is the back button on the workout screen.

Currently when the user taps this button, the workout is immediately cancelled and the user is sent back to the previous page. Tapping this button could happen by mistake and the user does not want to cancel the workout. There should be an [AlertDialog](https://api.flutter.dev/flutter/material/AlertDialog-class.html) that appears when the user taps the back button, asking them if they are sure they would like to exit the workout.
The dialog should read:
**Exit Workout**
Are you sure you would like to exit the current workout?
..............................Return to workout ......... Exit workout
AlertDialog implementation will be similar to the one in #107
**Acceptance Criteria:**
- [AlertDialog](https://api.flutter.dev/flutter/material/AlertDialog-class.html) implemented and appears on back button press on the workout screen.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
查看訓練畫面返回按鈕的實作,以及 issue #107 中現有的 AlertDialog。任務是攔截返回按鈕的按下操作,並顯示包含指定文字和兩個操作的確認對話框。執行應用程式進行測試,確認對話框會出現,並且能夠正確取消或繼續訓練。
由索引模型根據 Issue 內容生成。
評估
- 領域
- frontend, mobile
- Issue 類型
- 功能
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 75/100