CCExtractor / CCExtractor/ultimate_alarm_clock

Bug: Alarms are not saved to database when pressing Save (AlarmModel remains empty)

Offen
#896 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Dart
Sterne
112
Forks
227
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Description

When creating or updating an alarm on Android, the alarm is not saved to the **ISAR database**, and therefore it does not appear in the alarm list or ring at the scheduled time.

After pressing **Save**, the UI sometimes closes or returns to the previous screen, but the alarm is not persisted.

Using the Isar Inspector, the **AlarmModel** collection remains empty, which causes the scheduler to cancel alarms because it cannot detect any upcoming alarms.

### Steps to Reproduce

1. Run the application on a physical Android device.
2. Open the Add Alarm screen.
3. Set any valid alarm time.
4. Tap the Save button.
5. Return to the home screen.

### Expected Behavior

The alarm should be saved to the database and immediately appear in the alarm list.
The alarm should also be scheduled and ring at the selected time.

### Actual Behavior

- The alarm does not appear in the alarm list.

- No record is created in the _AlarmModel_ collection.

- The alarm never rings.

### Logs

During debugging the following logs appear:

`STOPPED IF CONDITION with latest = TimeOfDay(...)`

`FLUTTER CALLED CANCEL ALARMS`

This indicates that the scheduler cannot find any upcoming alarms and cancels scheduling.

### Database Observation

**Using Isar Inspector, the database state shows:**

AlarmModel = 0 records

This confirms that the alarm is not being persisted after pressing Save.

Image

The screenshot shows that other models (RingtoneModel, ProfileModel) exist,
but AlarmModel remains empty after pressing Save.

### Screenrecording

**This screen recording demonstrates that after pressing Save, the alarm is not added to the list and no record is created in the ISAR database.**

https://github.com/user-attachments/assets/5ae9486a-f9b9-4b68-a6a0-427d722eec57

### Environment

Flutter version: 3.22.2 (via FVM)
Platform: Android
Android SDK: 34
Device: Physical Android device

### I would like to work on fixing this issue if it is confirmed.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.