Skip to content

Commit

Permalink
Fix example app's ring now button
Browse files Browse the repository at this point in the history
  • Loading branch information
gdelataillade committed Sep 27, 2023
1 parent 74bd263 commit ef745da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion example/lib/screens/shortcut_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ class _ExampleAlarmHomeShortcutButtonState

Future<void> onPressButton(int delayInHours) async {
DateTime dateTime = DateTime.now().add(Duration(hours: delayInHours));
dateTime = dateTime.copyWith(second: 0, millisecond: 0);

if (delayInHours != 0) {
dateTime = dateTime.copyWith(second: 0, millisecond: 0);
}

setState(() => showMenu = false);

alarmPrint(dateTime.toString());

final alarmSettings = AlarmSettings(
id: DateTime.now().millisecondsSinceEpoch % 10000,
dateTime: dateTime,
Expand Down

0 comments on commit ef745da

Please sign in to comment.