-
Notifications
You must be signed in to change notification settings - Fork 205
Customizable Time Limits for Alarm Challenges #734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hi @MarkisDev , @NishantSinghal19 can you please review this PR Thank you |
@@ -406,17 +418,13 @@ class AlarmModel { | |||
} | |||
|
|||
String boolListToString(List<bool> boolList) { | |||
// Rotate the list to start with Sunday |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bring back these comments, helps us keep track of the logic.
@@ -157,7 +155,7 @@ class AlarmChallengeView extends GetView<AlarmChallengeController> { | |||
), | |||
Obx( | |||
() => Icon( | |||
controller.isQrOngoing.value == | |||
controller.isMathsOngoing.value == |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why have you changed the flag?
} | ||
await Future.delayed(duration ~/ i); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was done like this to keep the timer decreasing smoothly.
void updateTimeLimit(int newLimit) { | ||
challengeTimeLimit.value = newLimit; | ||
if (alarmRecord != null) { | ||
alarmRecord!.challengeTimeLimit = newLimit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont need challenge time limit in alarm clock if we're moving this control to secure storage. If value is not present, use the default of 30s.
apiKey.text = retrievedAPIKey; | ||
} | ||
|
||
// Store the retrieved weather state from the flutter secure storage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add back these comments
Description
This pull request implements customizable time limits for the challenges in our alarm app. Previously, the challenge duration was fixed (defaulting to 30 seconds). With these changes, users will be able to set their preferred duration via the challenge screen. The update includes modifications to the controller to store the user-defined time limit and changes to the view to let users update it.
Proposed Changes
alarm_challenge_controller.dart
alarm_challenge_view.dart
settings_controller.dart
settings_view.dart
Fixes #732
Screenshots
REC-20250310213646.mp4
Checklist