Skip to content

Commit

Permalink
Add options to select days while adding/updating an alarm (#329)
Browse files Browse the repository at this point in the history
* add options to auto select days

* feat: add weekdays and daily tile

* feat: add custom days tile

* fix: refactor tile
  • Loading branch information
its-me-abhishek authored Jan 17, 2024
1 parent 0defb61 commit 106cc95
Show file tree
Hide file tree
Showing 5 changed files with 379 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,34 @@ class AddOrUpdateAlarmController extends GetxController {
return userDetails;
}

RxBool isDailySelected = false.obs;
RxBool isWeekdaysSelected = false.obs;
RxBool isCustomSelected = false.obs;

void setIsDailySelected(bool value) {
isDailySelected.value = value;
if (value == true) {
isCustomSelected.value = false;
isWeekdaysSelected.value = false;
}
}

void setIsWeekdaysSelected(bool value) {
isWeekdaysSelected.value = value;
if (value == true) {
isCustomSelected.value = false;
isDailySelected.value = false;
}
}

void setIsCustomSelected(bool value) {
isCustomSelected.value = true;
if (value == true) {
isWeekdaysSelected.value = false;
isDailySelected.value = false;
}
}

checkOverlayPermissionAndNavigate() async {
if (!(await Permission.systemAlertWindow.isGranted) ||
!(await Permission.ignoreBatteryOptimizations.isGranted) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class RepeatOnceTile extends StatelessWidget {
? kLightSecondaryBackgroundColor
: ksecondaryBackgroundColor,
title: Text(
'Repeat only once'.tr,
'Ring once'.tr,
style: TextStyle(
color: themeController.isLightMode.value
? kLightPrimaryTextColor
Expand Down
Loading

0 comments on commit 106cc95

Please sign in to comment.